summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-06-12 16:10:28 +0300
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-06-12 16:10:28 +0300
commit929f9d8d5f2e7895016648557fa60c9d4a84baf6 (patch)
treec56628f2b391f7a313613f60dcfaf60915e31039 /indra/llui
parent14aa4dcdc23feafc537f06e49c48e9d693300103 (diff)
SL-19825 clear selection when right-clicking outside of selected items
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfolderview.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 8660048058..7e5a9efb37 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -1471,6 +1471,16 @@ BOOL LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask )
mCallbackRegistrar->popScope();
}
}
+
+ bool item_clicked = false;
+ for (selected_items_t::iterator item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it)
+ {
+ item_clicked |= (*item_it)->getRect().pointInRect(x, y);
+ }
+ if(!item_clicked && mSingleFolderMode)
+ {
+ clearSelection();
+ }
bool hide_folder_menu = mSuppressFolderMenu && isFolderSelected();
if (menu && (mSingleFolderMode || (handled
&& ( count > 0 && (hasVisibleChildren()) ))) && // show menu only if selected items are visible