diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-03-13 12:40:52 +0200 |
---|---|---|
committer | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-03-13 12:42:08 +0200 |
commit | 3c54d6a0371377f65c8eaa7eafffee0decdf4cbf (patch) | |
tree | c26b96bca65b39a90cb4e60c396e68c9730b21f6 /indra | |
parent | 1699bdbea75c47cf763d8a11078897c37c2599a3 (diff) |
SL-19386 Double click to open Single folder view should affect only Inventory
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llfolderviewitem.cpp | 25 | ||||
-rw-r--r-- | indra/llui/llfolderviewitem.h | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_main_inventory.xml | 9 |
3 files changed, 25 insertions, 13 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 6d2c346f76..227f1d79e4 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -114,6 +114,7 @@ LLFolderViewItem::Params::Params() text_pad("text_pad", 0), text_pad_right("text_pad_right", 0), single_folder_mode("single_folder_mode", false), + double_click_override("double_click_override", false), arrow_size("arrow_size", 0), max_folder_item_overlap("max_folder_item_overlap", 0) { } @@ -153,7 +154,8 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) mTextPadRight(p.text_pad_right), mArrowSize(p.arrow_size), mSingleFolderMode(p.single_folder_mode), - mMaxFolderItemOverlap(p.max_folder_item_overlap) + mMaxFolderItemOverlap(p.max_folder_item_overlap), + mDoubleClickOverride(p.double_click_override) { if (!sColorSetInitialized) { @@ -2077,16 +2079,19 @@ BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask ) } if( !handled ) { - static LLUICachedControl<U32> double_click_action("MultiModeDoubleClickFolder", false); - if (double_click_action == 1) + if(mDoubleClickOverride) { - getViewModelItem()->navigateToFolder(true); - return TRUE; - } - if (double_click_action == 2) - { - getViewModelItem()->navigateToFolder(false, true); - return TRUE; + static LLUICachedControl<U32> double_click_action("MultiModeDoubleClickFolder", false); + if (double_click_action == 1) + { + getViewModelItem()->navigateToFolder(true); + return TRUE; + } + if (double_click_action == 2) + { + getViewModelItem()->navigateToFolder(false, true); + return TRUE; + } } if(mIndentation < x && x < mIndentation + (isCollapsed() ? 0 : mArrowSize) + mTextPad) { diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index aa9ed0a1e8..b6437ab61d 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -72,7 +72,8 @@ public: text_pad_right, arrow_size, max_folder_item_overlap; - Optional<bool> single_folder_mode; + Optional<bool> single_folder_mode, + double_click_override; Params(); }; @@ -123,6 +124,7 @@ protected: mAllowWear, mAllowDrop, mSingleFolderMode, + mDoubleClickOverride, mSelectPending, mIsItemCut; diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index d400835198..af4511a92d 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -235,7 +235,9 @@ sort_order_setting="InventorySortOrder" show_item_link_overlays="true" top="16" - width="288" /> + width="288"> + <folder double_click_override="true"/> + </inventory_panel> <recent_inventory_panel bg_opaque_color="DkGray2" bg_alpha_color="DkGray2" @@ -250,7 +252,9 @@ left_delta="0" name="Recent Items" show_item_link_overlays="true" - width="290" /> + width="290"> + <folder double_click_override="true"/> + </recent_inventory_panel> <inventory_panel name="Worn Items" label="WORN" @@ -264,6 +268,7 @@ border="false" bevel_style="none" scroll.reserve_scroll_corner="false"> + <folder double_click_override="true"/> </inventory_panel> </tab_container> </panel> |