summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2013-04-30 18:17:20 -0700
committerGilbert Gonzales <gilbert@lindenlab.com>2013-04-30 18:17:20 -0700
commit4d72a6ea92d87822350be63e235b90daa4727d55 (patch)
tree13de7bc735fd40510f362d81ac090e0a0d68ce97 /indra
parent9fdfc8dd5c52e515990f3ef4e552b9084fa66373 (diff)
ACME-252 Create AvatarFolderItemView: Fixed focusing issue when hovering over a people view and then selected an icon. Now when selecting the icon upon hover the corresponding people view will be selected as well.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelpeople.cpp2
-rw-r--r--indra/newview/llpersonfolderview.cpp7
-rw-r--r--indra/newview/llpersontabview.cpp36
-rw-r--r--indra/newview/llpersontabview.h1
4 files changed, 44 insertions, 2 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index a9a024c9ed..77c3430c01 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -1690,7 +1690,7 @@ void LLPanelPeople::addTestParticipant()
for(int i = 0; i < 300; ++i)
{
LLPersonTabModel * person_folder_model = dynamic_cast<LLPersonTabModel *>(mPersonFolderView->mPersonFolderModelMap.begin()->second);
- addParticipantToModel(person_folder_model, LLUUID().generateNewID(), "EastBayGuy");
+ addParticipantToModel(person_folder_model, gAgent.getID(), "Test Name");
}
}
diff --git a/indra/newview/llpersonfolderview.cpp b/indra/newview/llpersonfolderview.cpp
index 636d093e0e..ba1e9d20eb 100644
--- a/indra/newview/llpersonfolderview.cpp
+++ b/indra/newview/llpersonfolderview.cpp
@@ -64,7 +64,12 @@ BOOL LLPersonFolderView::handleMouseDown( S32 x, S32 y, MASK mask )
}
}
- return LLFolderView::handleMouseDown(x, y, mask);
+ mKeyboardSelection = FALSE;
+ mSearchString.clear();
+
+ LLEditMenuHandler::gEditMenuHandler = this;
+
+ return LLView::handleMouseDown( x, y, mask );
}
bool LLPersonFolderView::onConversationModelEvent(const LLSD &event)
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);
diff --git a/indra/newview/llpersontabview.h b/indra/newview/llpersontabview.h
index 80020073d7..9cce615167 100644
--- a/indra/newview/llpersontabview.h
+++ b/indra/newview/llpersontabview.h
@@ -95,6 +95,7 @@ public:
BOOL postBuild();
void onMouseEnter(S32 x, S32 y, MASK mask);
void onMouseLeave(S32 x, S32 y, MASK mask);
+ BOOL handleMouseDown( S32 x, S32 y, MASK mask);
protected: