summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorygallery.cpp
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-04-04 15:14:02 +0300
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-04-04 15:14:02 +0300
commit7ccfbd7c285cc2ab0bbf569912f8e9e2d5c1df72 (patch)
tree1102d1b3ccb455e4500661fa3e420dd3189c5608 /indra/newview/llinventorygallery.cpp
parent77753a31aba6123696761aeeb2c535768fd1ea12 (diff)
SL-19379 Don't switch focus to other Inventory floater when creating an item in Gallery
Diffstat (limited to 'indra/newview/llinventorygallery.cpp')
-rw-r--r--indra/newview/llinventorygallery.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index da58aa70f9..c4da11a570 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -696,7 +696,7 @@ void LLInventoryGallery::updateAddedItem(LLUUID item_id)
LLInventoryGalleryItem* item = buildGalleryItem(name, item_id, obj->getType(), thumbnail_id, inventory_type, misc_flags, obj->getIsLinkType(), is_worn);
mItemMap.insert(LLInventoryGallery::gallery_item_map_t::value_type(item_id, item));
item->setRightMouseDownCallback(boost::bind(&LLInventoryGallery::showContextMenu, this, _1, _2, _3, item_id));
- item->setFocusReceivedCallback(boost::bind(&LLInventoryGallery::onChangeItemSelection, this, item_id));
+ item->setFocusReceivedCallback(boost::bind(&LLInventoryGallery::changeItemSelection, this, item_id));
if (mGalleryCreated)
{
addToGallery(item);
@@ -789,21 +789,21 @@ void LLInventoryGallery::showContextMenu(LLUICtrl* ctrl, S32 x, S32 y, const LLU
}
}
-void LLInventoryGallery::onChangeItemSelection(const LLUUID& category_id)
+void LLInventoryGallery::changeItemSelection(const LLUUID& item_id)
{
- if (mSelectedItemID == category_id)
+ if ((mItemMap.count(item_id) > 0) && (mSelectedItemID == item_id))
return;
if (mItemMap[mSelectedItemID])
{
mItemMap[mSelectedItemID]->setSelected(FALSE);
}
- if (mItemMap[category_id])
+ if (mItemMap[item_id])
{
- mItemMap[category_id]->setSelected(TRUE);
+ mItemMap[item_id]->setSelected(TRUE);
}
- mSelectedItemID = category_id;
- signalSelectionItemID(category_id);
+ mSelectedItemID = item_id;
+ signalSelectionItemID(item_id);
}
void LLInventoryGallery::updateMessageVisibility()