Allow right clicking anywhere on a scroll list for a menu, except the header buttons

This commit is contained in:
Lirusaito
2013-07-18 15:51:28 -04:00
parent 306e587ae9
commit ceb9c99736

View File

@@ -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)