From 26f64e4f0a007edc01996cdc0bc69121a16749b9 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 16 Jun 2023 13:06:37 +0300 Subject: SL-19873 Clear gallery selection when right-clicking outside of selected items --- indra/newview/llinventorygallery.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview') 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()) { -- cgit v1.2.3