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:
parent
77850e8dba
commit
83ea4af492
@ -2528,8 +2528,10 @@ 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;
|
||||
|
Loading…
Reference in New Issue
Block a user