]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Avoid jumping of entries in data-selector window -- restore scrollbar position after...
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Nov 2009 21:39:51 +0000 (21:39 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Nov 2009 21:39:51 +0000 (21:39 +0000)
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)