From 929f9d8d5f2e7895016648557fa60c9d4a84baf6 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 12 Jun 2023 16:10:28 +0300 Subject: SL-19825 clear selection when right-clicking outside of selected items --- indra/llui/llfolderview.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/llui') 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 -- cgit v1.2.3