summaryrefslogtreecommitdiff
path: root/indra/newview/llsidepaneltaskinfo.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-11-30 13:02:19 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-11-30 13:30:27 +0200
commit27dae1d96753634c40619af8bc5b982f5238289b (patch)
treec0a0e28d016ee08f82033385450c71b5a268e0ad /indra/newview/llsidepaneltaskinfo.cpp
parent683bf84bb38adc88d4a4b7fedaed89b41fcac45e (diff)
parent110eb2c989b6655796c15a657d0898375027f3f2 (diff)
Merge branch 'DRTVWR-591-maint-X' into marchcat/591-x-pbr-merge
# Conflicts: # indra/llrender/llgl.cpp # indra/llrender/llvertexbuffer.cpp # indra/llui/llflatlistview.cpp # indra/newview/app_settings/settings.xml # indra/newview/lldrawpoolground.cpp # indra/newview/llinventorybridge.cpp # indra/newview/llinventorygallery.cpp # indra/newview/llspatialpartition.cpp # indra/newview/llviewercontrol.cpp # indra/newview/llviewertexture.cpp # indra/newview/llvosky.cpp # indra/newview/skins/default/xui/en/menu_inventory.xml
Diffstat (limited to 'indra/newview/llsidepaneltaskinfo.cpp')
-rw-r--r--indra/newview/llsidepaneltaskinfo.cpp34
1 files changed, 29 insertions, 5 deletions
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index fe61b7a02a..ad8e1a6506 100644
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -74,6 +74,32 @@ LLSidepanelTaskInfo* LLSidepanelTaskInfo::sActivePanel = NULL;
static LLPanelInjector<LLSidepanelTaskInfo> t_task_info("sidepanel_task_info");
+static std::string click_action_to_string_value(U8 click_action)
+{
+ switch (click_action)
+ {
+ case CLICK_ACTION_TOUCH:
+ return "Touch";
+ case CLICK_ACTION_SIT:
+ return "Sit";
+ case CLICK_ACTION_BUY:
+ return "Buy";
+ case CLICK_ACTION_PAY:
+ return "Pay";
+ case CLICK_ACTION_OPEN:
+ return "Open";
+ case CLICK_ACTION_ZOOM:
+ return "Zoom";
+ case CLICK_ACTION_DISABLED:
+ return "None";
+ case CLICK_ACTION_IGNORE:
+ return "Ignore";
+ default:
+ return "Touch";
+ }
+ return "Touch";
+}
+
// Default constructor
LLSidepanelTaskInfo::LLSidepanelTaskInfo()
: mVisibleDebugPermissions(true) // space was allocated by default
@@ -891,11 +917,7 @@ void LLSidepanelTaskInfo::refresh()
U8 click_action = 0;
if (LLSelectMgr::getInstance()->selectionGetClickAction(&click_action))
{
- LLComboBox* ComboClickAction = getChild<LLComboBox>("clickaction");
- if (ComboClickAction)
- {
- ComboClickAction->setCurrentByIndex((S32)click_action);
- }
+ getChild<LLComboBox>("clickaction")->setValue(click_action_to_string_value(click_action));
}
getChildView("label click action")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume);
getChildView("clickaction")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume);
@@ -1152,6 +1174,8 @@ static U8 string_value_to_click_action(std::string p_value)
return CLICK_ACTION_ZOOM;
if (p_value == "None")
return CLICK_ACTION_DISABLED;
+ if (p_value == "Ignore")
+ return CLICK_ACTION_IGNORE;
return CLICK_ACTION_TOUCH;
}