From acf1d9714e6ca198cc74a5741e0d35309f4e54e1 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Mon, 1 Dec 2014 15:12:30 +0100 Subject: [PATCH] Locale: fix selection of format when Default'ing Using item->SetExpanded does not work in a BOutlineListView as the status of the list is then out of sync. The child items are not actually added to the visible list, and trying to select them won't work. Using list->Expand() instead works fine, so do that. Fixes the remaining part of #6805. --- src/preferences/locale/LocaleWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/preferences/locale/LocaleWindow.cpp b/src/preferences/locale/LocaleWindow.cpp index 5db62523cd..ef8c2de6ce 100644 --- a/src/preferences/locale/LocaleWindow.cpp +++ b/src/preferences/locale/LocaleWindow.cpp @@ -642,7 +642,7 @@ LocaleWindow::_Defaults() BListItem* superitem = fConventionsListView->Superitem(fDefaultConventionsItem); if (superitem != NULL && !superitem->IsExpanded()) - superitem->SetExpanded(true); + fConventionsListView->Expand(superitem); fConventionsListView->Select(fConventionsListView->IndexOf( fDefaultConventionsItem)); fConventionsListView->ScrollToSelection();