]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/EveBase/AliEveMacroExecutorWindow.cxx
Fix Coverity
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveMacroExecutorWindow.cxx
index 8f2d33a65d3bb7670463649413eb85b6a2e93850..39ac0b6d17d6b3705197c35dad0d6af8197d77ef 100644 (file)
@@ -51,6 +51,10 @@ public:
 protected:
   static TGGC    *gfGC;
   static TGFont  *gfFont;
+
+private:
+  AliEveMEWListBox(const AliEveMEWListBox&);            // Not implemented
+  AliEveMEWListBox& operator=(const AliEveMEWListBox&); // Not implemented
 };
 
 TGGC   *AliEveMEWListBox::gfGC   = 0;
@@ -59,9 +63,6 @@ TGFont *AliEveMEWListBox::gfFont = 0;
 
 class AliEveMEWEditor : public TGedEditor
 {
-protected:
-  AliEveMacroExecutorWindow* fMEW;
-
 public:
   AliEveMEWEditor(AliEveMacroExecutorWindow* w) : TGedEditor(0), fMEW(w) {}
   virtual ~AliEveMEWEditor() {}
@@ -74,6 +75,11 @@ public:
   {
     SetModel(fPad, fModel, kButton1Down);
   }
+protected:
+  AliEveMacroExecutorWindow* fMEW;
+private:
+  AliEveMEWEditor(const AliEveMEWEditor&);            // Not implemented
+  AliEveMEWEditor& operator=(const AliEveMEWEditor&); // Not implemented
 };
 
 //______________________________________________________________________________
@@ -86,7 +92,8 @@ ClassImp(AliEveMacroExecutorWindow)
 AliEveMacroExecutorWindow::AliEveMacroExecutorWindow(AliEveMacroExecutor* master) :
   TGMainFrame(gClient->GetRoot()), fM(master),
   fMainFrame(0), fCtrlFrame(0), fListBox(0), fEditor(0),
-  fSelectTags(0)
+  fSelectTags(0),
+  fBoxContents()
 {
   // Constructor.
 
@@ -184,6 +191,8 @@ void AliEveMacroExecutorWindow::PopulateMacros(Bool_t keep_selected)
   if (keep_selected && fListBox->GetSelected() != -1)
     ex_sel = fBoxContents[fListBox->GetSelected()];
 
+  Int_t sbar_pos = fListBox->GetVScrollbar()->GetPosition();
+
   fListBox->RemoveAll();
   fBoxContents.clear();
 
@@ -191,10 +200,7 @@ void AliEveMacroExecutorWindow::PopulateMacros(Bool_t keep_selected)
   TString     select = fSelectTags->GetText();
   if ( ! select.IsNull())
   {
-    // "i" does not work (get pcre_exec error = -3 PCRE_ERROR_BADOPTION)
-    // same for 1 (the value of PCRE_CASELESS)
-    // using case-sensitive matching then ... must investigate in root
-    regexp = new TPMERegexp(select);
+    regexp = new TPMERegexp(select, "io");
   }
 
   TIter next(fM->fMacros);
@@ -215,8 +221,9 @@ void AliEveMacroExecutorWindow::PopulateMacros(Bool_t keep_selected)
   if (sel_id != -1)
     fListBox->Select(sel_id);
 
-  fListBox->MapSubwindows();
   fListBox->Layout();
+  fListBox->GetVScrollbar()->SetPosition(sbar_pos);
+  fListBox->MapSubwindows();
 }
 
 void AliEveMacroExecutorWindow::SetActiveStateOfShownMacros(Bool_t active)