Don't start tracking if user clicked and released mouse button on a zone without any item.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18559 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2006-08-22 08:55:52 +00:00
parent 171ee97271
commit 136869d8c0

View File

@ -467,8 +467,7 @@ BMenuBar::Track(int32 *action, int32 startIndex, bool showMenu)
|| (buttons != 0 && IsStickyMode() && menuItem == NULL))
break;
else if (buttons == 0 && !IsStickyMode()) {
// On an item without a submenu
if (fSelected != NULL && fSelected->Submenu() == NULL) {
if ((fSelected != NULL && fSelected->Submenu() == NULL) || menuItem == NULL) {
resultItem = fSelected;
break;
} else