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:
@@ -2528,8 +2528,10 @@ BMenu::_HitTestItems(BPoint where, BPoint slop) const
|
|||||||
int32 itemCount = CountItems();
|
int32 itemCount = CountItems();
|
||||||
for (int32 i = 0; i < itemCount; i++) {
|
for (int32 i = 0; i < itemCount; i++) {
|
||||||
BMenuItem* item = ItemAt(i);
|
BMenuItem* item = ItemAt(i);
|
||||||
if (item->Frame().Contains(where))
|
if (item->Frame().Contains(where)
|
||||||
|
&& dynamic_cast<BSeparatorItem*>(item) == NULL) {
|
||||||
return item;
|
return item;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user