summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2009-12-23 16:06:29 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2009-12-23 16:06:29 -0800
commitb518a3a5f0d13a6dedfcd60918369076b48f5ece (patch)
treed5c3f917a2bae9cea12bfef0853e9948d11ef02b
parented4ee71889e2614235c9b65cc8807d4eada8836d (diff)
EXT-3532 Can't deactivate "Render Attached Lights" and "Render Attached Particles"
-rw-r--r--indra/newview/llviewermenu.cpp20
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml4
2 files changed, 15 insertions, 9 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 620c700077..2a9c738c97 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -6479,21 +6479,27 @@ void menu_toggle_attached_particles(void* user_data)
LLPipeline::sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles");
}
-class LLAdvancedHandleAttchedLightParticles: public view_listener_t
+class LLAdvancedHandleAttachedLightParticles: public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
std::string control_name = userdata.asString();
+
+ // toggle the control
+ gSavedSettings.setBOOL(control_name,
+ !gSavedSettings.getBOOL(control_name));
+
+ // update internal flags
if (control_name == "RenderAttachedLights")
-{
+ {
menu_toggle_attached_lights(NULL);
-}
+ }
else if (control_name == "RenderAttachedParticles")
-{
+ {
menu_toggle_attached_particles(NULL);
-}
+ }
return true;
-}
+ }
};
class LLSomethingSelected : public view_listener_t
@@ -7763,7 +7769,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedVectorizePerfTest(), "Advanced.VectorizePerfTest");
view_listener_t::addMenu(new LLAdvancedToggleFrameTest(), "Advanced.ToggleFrameTest");
view_listener_t::addMenu(new LLAdvancedCheckFrameTest(), "Advanced.CheckFrameTest");
- view_listener_t::addMenu(new LLAdvancedHandleAttchedLightParticles(), "Advanced.HandleAttchedLightParticles");
+ view_listener_t::addMenu(new LLAdvancedHandleAttachedLightParticles(), "Advanced.HandleAttachedLightParticles");
#ifdef TOGGLE_HACKED_GODLIKE_VIEWER
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 3dae5008a0..0640ae21de 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2555,7 +2555,7 @@
function="CheckControl"
parameter="RenderAttachedLights" />
<menu_item_check.on_click
- function="Advanced.HandleAttchedLightParticles"
+ function="Advanced.HandleAttachedLightParticles"
parameter="RenderAttachedLights" />
</menu_item_check>
<menu_item_check
@@ -2565,7 +2565,7 @@
function="CheckControl"
parameter="RenderAttachedParticles" />
<menu_item_check.on_click
- function="Advanced.HandleAttchedLightParticles"
+ function="Advanced.HandleAttachedLightParticles"
parameter="RenderAttachedParticles" />
</menu_item_check>
<menu_item_check