diff options
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfolderviewitem.cpp | 25 | ||||
-rw-r--r-- | indra/llui/llfolderviewitem.h | 4 |
2 files changed, 18 insertions, 11 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; |