diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-06-16 13:06:37 +0300 |
---|---|---|
committer | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-06-16 13:06:37 +0300 |
commit | 26f64e4f0a007edc01996cdc0bc69121a16749b9 (patch) | |
tree | 6f338ff285181953d2e1f5383854c68e36e9b601 /indra/newview/llinventorygallery.cpp | |
parent | d9a8ccc2c061bc034ebb6fb13b0950615d8bf30d (diff) |
SL-19873 Clear gallery selection when right-clicking outside of selected items
Diffstat (limited to 'indra/newview/llinventorygallery.cpp')
-rw-r--r-- | indra/newview/llinventorygallery.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index c584def3eb..40c76a4b5f 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -936,13 +936,13 @@ void LLInventoryGallery::updateItemThumbnail(LLUUID item_id) BOOL LLInventoryGallery::handleRightMouseDown(S32 x, S32 y, MASK mask) { - LLUUID old_selection = mSelectedItemID; - BOOL res = LLPanel::handleRightMouseDown(x, y, mask); - if (!res) + if(mItemMap[mSelectedItemID]) { - clearSelection(); - mItemMap[old_selection]->setFocus(false); + mItemMap[mSelectedItemID]->setFocus(false); + setFocus(true); } + clearSelection(); + BOOL res = LLPanel::handleRightMouseDown(x, y, mask); if (mSelectedItemID.isNull()) { |