]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/EveBase/AliEveMacroExecutorWindow.cxx
Avoid jumping of entries in data-selector window -- restore scrollbar position after...
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveMacroExecutorWindow.cxx
index 96b5fe73a9771a4583e6a59f21582128478c4487..39ac0b6d17d6b3705197c35dad0d6af8197d77ef 100644 (file)
@@ -191,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();
 
@@ -219,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)