If show() fails, deselect the parent menu item.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18598 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5ce268a62d
commit
37f49a44b4
@ -1897,7 +1897,11 @@ BMenu::SelectItem(BMenuItem *menuItem, uint32 showSubmenu, bool selectFirstItem)
|
||||
if (fSelected != NULL && showSubmenu == 0) {
|
||||
BMenu *subMenu = fSelected->Submenu();
|
||||
if (subMenu != NULL && subMenu->Window() == NULL) {
|
||||
subMenu->_show(selectFirstItem);
|
||||
if (!subMenu->_show(selectFirstItem)) {
|
||||
// something went wrong, deselect the item
|
||||
fSelected->Select(false);
|
||||
fSelected = NULL;
|
||||
}
|
||||
//subMenu->Window()->Activate();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user