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/llui/llfolderviewitem.cpp | |
| parent | 1699bdbea75c47cf763d8a11078897c37c2599a3 (diff) | |
SL-19386 Double click to open Single folder view should affect only Inventory
Diffstat (limited to 'indra/llui/llfolderviewitem.cpp')
| -rw-r--r-- | indra/llui/llfolderviewitem.cpp | 25 |
1 files changed, 15 insertions, 10 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) { |
