From b781587aff82672ea0b6e8694f7b03829efe9ccc Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Wed, 22 Mar 2006 20:52:25 +0000 Subject: [PATCH] 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 --- src/kits/interface/MenuBar.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kits/interface/MenuBar.cpp b/src/kits/interface/MenuBar.cpp index 73af461a1e..0e6c4a9ea8 100644 --- a/src/kits/interface/MenuBar.cpp +++ b/src/kits/interface/MenuBar.cpp @@ -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();