From 3d5f2c6f8d7400b6fcbf66639abb3ae43a3b5306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Mon, 19 Apr 2010 08:46:29 +0000 Subject: [PATCH] Patch by idefix, make sure the lists are properly scrolled to the selection after showing the window. Thanks! Fixes #5576. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36343 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/readonlybootprompt/BootPromptWindow.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/apps/readonlybootprompt/BootPromptWindow.cpp b/src/apps/readonlybootprompt/BootPromptWindow.cpp index 054c016825..a2d93669b9 100644 --- a/src/apps/readonlybootprompt/BootPromptWindow.cpp +++ b/src/apps/readonlybootprompt/BootPromptWindow.cpp @@ -130,12 +130,16 @@ BootPromptWindow::BootPromptWindow() ) ); - // This call in the first _PopulateKeymaps had no effect yet, since the - // list wasn't attatched to the window yet. - fKeymapsListView->ScrollToSelection(); - CenterOnScreen(); Show(); + Lock(); + + // This call in the first _PopulateLanguages/Keymaps had no effect yet, + // since the list wasn't attached to the window yet. + fLanguagesListView->ScrollToSelection(); + fKeymapsListView->ScrollToSelection(); + + Unlock(); } @@ -295,6 +299,8 @@ BootPromptWindow::_PopulateLanguages() printf("failed to get BLanguage for %s\n", languageString); } + fLanguagesListView->ScrollToSelection(); + // Re-enable sending the selection message. fLanguagesListView->SetSelectionMessage( new BMessage(MSG_LANGUAGE_SELECTED));