BMenuItems are invoked if needed when they are child of a menubar. Fixes bug 343

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16862 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2006-03-22 20:52:25 +00:00
parent b80eb9d443
commit b781587aff
+4 -1
View File
@@ -421,8 +421,11 @@ BMenuBar::Track(int32 *action, int32 startIndex, bool showMenu)
}
if (window->Lock()) {
if (fSelected != NULL)
if (fSelected != NULL) {
if (fSelected->Submenu() == NULL)
resultItem = fSelected;
SelectItem(NULL);
}
if (resultItem != NULL)
resultItem->Invoke();
window->Unlock();