summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r--indra/newview/llinventorypanel.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 74d9e895c2..3608f9e23f 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -158,7 +158,8 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
mViewsInitialized(VIEWS_UNINITIALIZED),
mInvFVBridgeBuilder(NULL),
mInventoryViewModel(p.name),
- mGroupedItemBridge(new LLFolderViewGroupedItemBridge)
+ mGroupedItemBridge(new LLFolderViewGroupedItemBridge),
+ mFocusSelection(false)
{
mInvFVBridgeBuilder = &INVENTORY_BRIDGE_BUILDER;
@@ -1240,6 +1241,7 @@ void LLInventoryPanel::setSelectCallback(const boost::function<void (const std::
void LLInventoryPanel::clearSelection()
{
mSelectThisID.setNull();
+ mFocusSelection = false;
}
LLInventoryPanel::selected_items_t LLInventoryPanel::getSelectedItems() const
@@ -1714,15 +1716,17 @@ LLFolderViewFolder* LLInventoryPanel::getFolderByID(const LLUUID& id)
void LLInventoryPanel::setSelectionByID( const LLUUID& obj_id, BOOL take_keyboard_focus )
{
LLFolderViewItem* itemp = getItemByID(obj_id);
- if(itemp && itemp->getViewModelItem())
+ if(itemp && itemp->getViewModelItem() && itemp->passedFilter())
{
itemp->arrangeAndSet(TRUE, take_keyboard_focus);
mSelectThisID.setNull();
+ mFocusSelection = false;
return;
}
else
{
// save the desired item to be selected later (if/when ready)
+ mFocusSelection = take_keyboard_focus;
mSelectThisID = obj_id;
}
}
@@ -1731,7 +1735,7 @@ void LLInventoryPanel::updateSelection()
{
if (mSelectThisID.notNull())
{
- setSelectionByID(mSelectThisID, false);
+ setSelectionByID(mSelectThisID, mFocusSelection);
}
}