BMenu: Don't hit test separator items

Fixes #4147 while not causing the regression described in #6610
like hrev35248 did.
This commit is contained in:
John Scipione 2013-08-20 13:34:14 -04:00
parent 77850e8dba
commit 83ea4af492

View File

@ -2528,9 +2528,11 @@ BMenu::_HitTestItems(BPoint where, BPoint slop) const
int32 itemCount = CountItems();
for (int32 i = 0; i < itemCount; i++) {
BMenuItem* item = ItemAt(i);
if (item->Frame().Contains(where))
if (item->Frame().Contains(where)
&& dynamic_cast<BSeparatorItem*>(item) == NULL) {
return item;
}
}
return NULL;
}