applied a patch from barber for bug #661. Thanks! This fixes a weird behavior when using the menu
minor cleanup git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18093 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2205ee0914
commit
e2d5e00981
@ -182,11 +182,12 @@ MethodReplicant::MouseDown(BPoint point)
|
||||
where = ConvertToScreen(point);
|
||||
|
||||
fMenu.SetTargetForItems(this);
|
||||
MethodMenuItem *item = (MethodMenuItem*)fMenu.Go(where, true, true, BRect(where - BPoint(4, 4),
|
||||
where + BPoint(4, 4)));
|
||||
if (item) {
|
||||
BMenuItem *item = fMenu.Go(where, true, true,
|
||||
BRect(where - BPoint(4, 4), where + BPoint(4, 4)));
|
||||
|
||||
if (item && dynamic_cast<MethodMenuItem *>(item)) {
|
||||
BMessage msg(IS_SET_METHOD);
|
||||
msg.AddInt32("cookie", item->Cookie());
|
||||
msg.AddInt32("cookie", ((MethodMenuItem*)item)->Cookie());
|
||||
BMessenger messenger(fSignature);
|
||||
messenger.SendMessage(&msg);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user