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.
This commit is contained in:
Adrien Destugues
2014-12-01 15:12:30 +01:00
parent 3d2cd4484d
commit acf1d9714e
+1 -1
View File
@@ -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();