summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-12-29 11:55:20 -0800
committerJames Cook <james@lindenlab.com>2009-12-29 11:55:20 -0800
commitc2915a889987e64484c9794d55740e7f6ac8f9bd (patch)
treee09a6050829fbc4b1f8fdae03f6c12742ba903ed /indra/newview/llviewermenu.cpp
parent1e9a5c21e5493ad3dabec4d032bc0a627e2f725f (diff)
parent3519435bbfeec4c838d5ffbe008d0ac7bbc085a8 (diff)
Merge viewer-2-0 into gooey
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp29
1 files changed, 20 insertions, 9 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 23bcca9603..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
@@ -7423,12 +7429,17 @@ class LLEditTakeOff : public view_listener_t
{
std::string clothing = userdata.asString();
if (clothing == "all")
- LLAgentWearables::userRemoveAllClothes();
+ LLWearableBridge::removeAllClothesFromAvatar();
else
{
EWearableType type = LLWearableDictionary::typeNameToType(clothing);
if (type >= WT_SHAPE && type < WT_COUNT)
- LLAgentWearables::userRemoveWearable(type);
+ {
+ // MULTI-WEARABLES
+ LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>(gAgentWearables.getWearableInventoryItem(type,0));
+ LLWearableBridge::removeItemFromAvatar(item);
+ }
+
}
return true;
}
@@ -7758,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