diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 0cc500fb3c..5504693acc 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -1809,6 +1809,27 @@ class LLAdvancedToggleShowLookAt : public view_listener_t
}
};
+//
+class LLAdvancedToggleShowColor : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ S32 value = !gSavedSettings.getS32("DebugShowColor");
+ gSavedSettings.setS32("DebugShowColor",value);
+ return true;
+ }
+};
+
+class LLAdvancedCheckShowColor : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ S32 new_value = gSavedSettings.getS32("DebugShowColor");
+ return (bool)new_value;
+ }
+};
+//
+
class LLAdvancedCheckShowLookAt : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -9603,6 +9624,8 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedToggleAnimationInfo(), "Advanced.ToggleAnimationInfo");
view_listener_t::addMenu(new LLAdvancedCheckAnimationInfo(), "Advanced.CheckAnimationInfo");
view_listener_t::addMenu(new LLAdvancedToggleShowLookAt(), "Advanced.ToggleShowLookAt");
+ view_listener_t::addMenu(new LLAdvancedToggleShowColor(), "Advanced.ToggleShowColor");
+ view_listener_t::addMenu(new LLAdvancedCheckShowColor(), "Advanced.CheckShowColor");
view_listener_t::addMenu(new LLAdvancedCheckShowLookAt(), "Advanced.CheckShowLookAt");
view_listener_t::addMenu(new LLAdvancedToggleShowPointAt(), "Advanced.ToggleShowPointAt");
view_listener_t::addMenu(new LLAdvancedCheckShowPointAt(), "Advanced.CheckShowPointAt");
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 165f47ce9a..b30bd0cb13 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2858,11 +2858,9 @@
label="Show Color Under Cursor"
name="Show Color Under Cursor">
+ function="Advanced.CheckShowColor" />
+ function="Advanced.ToggleShowColor" />