SL-19386 Double click to open Single folder view should affect only Inventory

master
Maxim Nikolenko 2023-03-13 12:40:52 +02:00
parent 1699bdbea7
commit 3c54d6a037
3 changed files with 25 additions and 13 deletions

View File

@ -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)
{

View File

@ -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;

View File

@ -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>