From ceb9c997360504f90d59d563e8f10c8432cfd010 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 18 Jul 2013 15:51:28 -0400 Subject: [PATCH] Allow right clicking anywhere on a scroll list for a menu, except the header buttons --- indra/llui/llscrolllistctrl.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 5f0c224b5..6eca09c04 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1734,11 +1734,15 @@ BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask) if (item) { if (!item->getSelected()) selectItem(item); // Right click on unselected item is for that item only - mPopupMenu->buildDrawLabels(); - LLMenuGL::showPopup(this, mPopupMenu, x, y); - return TRUE; } - return FALSE; + else if (LLScrollListColumn* col = getColumn(getColumnIndexFromOffset(x))) + { + if (col->mHeader && col->mHeader->getRect().pointInRect(x,y)) // Right clicking a column header shouldn't bring up a menu + return FALSE; + } + mPopupMenu->buildDrawLabels(); + LLMenuGL::showPopup(this, mPopupMenu, x, y); + return TRUE; } BOOL LLScrollListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)