From 35636bd21f38a59cc5b490a5728c4e5389be78ec Mon Sep 17 00:00:00 2001 From: Aleksas Pantechovskis Date: Sat, 17 Dec 2011 21:55:29 +0100 Subject: [PATCH] Fix selection of attachment on right click. * Fixed during of GCI 2011. * Fixes #7982 Signed-off-by: Siarzhuk Zharski --- src/apps/mail/Enclosures.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/apps/mail/Enclosures.cpp b/src/apps/mail/Enclosures.cpp index ffc3fe674a..f55dbe12fd 100644 --- a/src/apps/mail/Enclosures.cpp +++ b/src/apps/mail/Enclosures.cpp @@ -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); + } }