diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-05-30 13:10:36 +0300 |
---|---|---|
committer | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-05-30 13:10:36 +0300 |
commit | 5c55adae47cab93a12793528373f639ea9e8efcf (patch) | |
tree | ffc13bb9ee911a2ed2560e008d585363b2059638 /indra/llui/llfolderview.cpp | |
parent | d42f2a1887a1bc94a97c08bfe676731672ce53d3 (diff) |
SL-19773 add context menu for root folder in single folder mode
Diffstat (limited to 'indra/llui/llfolderview.cpp')
-rw-r--r-- | indra/llui/llfolderview.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 798c00d0ca..f0106e345c 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -190,7 +190,8 @@ LLFolderView::LLFolderView(const Params& p) mShowItemLinkOverlays(p.show_item_link_overlays), mViewModel(p.view_model), mGroupedItemModel(p.grouped_item_model), - mForceArrange(false) + mForceArrange(false), + mSingleFolderMode(false) { LLPanel* panel = p.parent_panel; mParentPanel = panel->getHandle(); @@ -1475,8 +1476,8 @@ BOOL LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask ) } } bool hide_folder_menu = mSuppressFolderMenu && isFolderSelected(); - if (menu && (handled - && ( count > 0 && (hasVisibleChildren()) )) && // show menu only if selected items are visible + if (menu && (mSingleFolderMode || (handled + && ( count > 0 && (hasVisibleChildren()) ))) && // show menu only if selected items are visible !hide_folder_menu) { if (mCallbackRegistrar) @@ -1918,6 +1919,11 @@ void LLFolderView::updateMenuOptions(LLMenuGL* menu) flags = multi_select_flag; } + if(mSingleFolderMode && (mSelectedItems.size() == 0)) + { + buildContextMenu(*menu, flags); + } + // This adds a check for restrictions based on the entire // selection set - for example, any one wearable may not push you // over the limit, but all wearables together still might. |