summaryrefslogtreecommitdiff
path: root/indra/newview/llpersontabview.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-05-02 16:36:02 -0700
committerMerov Linden <merov@lindenlab.com>2013-05-02 16:36:02 -0700
commitcc7440d0853d269a5b955ab021db729ed5b6a92c (patch)
tree12139acedc8bf22f95d4da0507ef84fb870590cd /indra/newview/llpersontabview.cpp
parenta73305c41d058fc755b824e5a9243afe43b424e1 (diff)
parentf849606399b902e71f4389ad1d7e0fc15f10d8b5 (diff)
Pull merge from viewer-fbc
Diffstat (limited to 'indra/newview/llpersontabview.cpp')
-rw-r--r--indra/newview/llpersontabview.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/indra/newview/llpersontabview.cpp b/indra/newview/llpersontabview.cpp
index 76f3151777..fdc024beb8 100644
--- a/indra/newview/llpersontabview.cpp
+++ b/indra/newview/llpersontabview.cpp
@@ -65,6 +65,7 @@ BOOL LLPersonTabView::handleMouseDown( S32 x, S32 y, MASK mask )
if(selected_item)
{
+ gFocusMgr.setKeyboardFocus( this );
highlight = true;
}
@@ -204,6 +205,41 @@ void LLPersonView::onMouseLeave(S32 x, S32 y, MASK mask)
LLFolderViewItem::onMouseLeave(x, y, mask);
}
+BOOL LLPersonView::handleMouseDown( S32 x, S32 y, MASK mask)
+{
+ if(!LLView::childrenHandleMouseDown(x, y, mask))
+ {
+ gFocusMgr.setMouseCapture( this );
+ }
+
+ if (!mIsSelected)
+ {
+ if(mask & MASK_CONTROL)
+ {
+ getRoot()->changeSelection(this, !mIsSelected);
+ }
+ else if (mask & MASK_SHIFT)
+ {
+ getParentFolder()->extendSelectionTo(this);
+ }
+ else
+ {
+ getRoot()->setSelection(this, FALSE);
+ }
+ make_ui_sound("UISndClick");
+ }
+ else
+ {
+ // If selected, we reserve the decision of deselecting/reselecting to the mouse up moment.
+ // This is necessary so we maintain selection consistent when starting a drag.
+ mSelectPending = TRUE;
+ }
+
+ mDragStartX = x;
+ mDragStartY = y;
+ return TRUE;
+}
+
void LLPersonView::draw()
{
static LLUIColor sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE);