Fix selection of attachment on right click.

* Fixed during of GCI 2011.
* Fixes #7982

Signed-off-by: Siarzhuk Zharski <[email protected]>
This commit is contained in:
Aleksas Pantechovskis
2011-12-17 22:00:30 +01:00
committed by Siarzhuk Zharski
parent 8ff2ca22f7
commit 35636bd21f
+4 -3
View File
@@ -426,7 +426,9 @@ TListView::MouseDown(BPoint point)
int32 buttons;
Looper()->CurrentMessage()->FindInt32("buttons", &buttons);
if ((buttons & B_SECONDARY_MOUSE_BUTTON) != 0) {
BListView::MouseDown(point);
if ((buttons & B_SECONDARY_MOUSE_BUTTON) != 0 && IndexOf(point) >= 0) {
BPopUpMenu menu("enclosure", false, false);
menu.SetFont(be_plain_font);
menu.AddItem(new BMenuItem(B_TRANSLATE("Open attachment"),
@@ -448,8 +450,7 @@ TListView::MouseDown(BPoint point)
Window()->PostMessage(item->Command(),fParent);
}
}
} else
BListView::MouseDown(point);
}
}