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:
Stefano Ceccherini 2006-08-24 08:57:05 +00:00
parent 5ce268a62d
commit 37f49a44b4

View File

@ -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();
}
}