summaryrefslogtreecommitdiff
path: root/indra/newview/llcofwearables.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-07-05 16:55:05 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-07-05 16:55:05 +0300
commit510958f6c4f4f1c1377fec0e484d7ef4d1d95030 (patch)
treede0cf19126d32f23e05e0c2909a90ce49f34eaf2 /indra/newview/llcofwearables.cpp
parent863e6ea4035683610e35bfa90171b7a35b9dce64 (diff)
parent3de5be44adb91d3a7e1ff3ca8b415964a722ce49 (diff)
Merge from default branch
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llcofwearables.cpp')
-rw-r--r--indra/newview/llcofwearables.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index cbebc93306..472d2ccf24 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -167,10 +167,18 @@ public:
protected:
static void replaceWearable()
{
- static LLButton* show_add_wearables_btn =
- LLSideTray::getInstance()->getChild<LLButton>("show_add_wearables_btn");
-
- show_add_wearables_btn->onCommit();
+ // *TODO: Most probable that accessing to LLPanelOutfitEdit instance should be:
+ // LLSideTray::getInstance()->getSidepanelAppearance()->getPanelOutfitEdit()
+ // without casting. Getter methods provides possibility to check and construct
+ // absent instance. Explicit relations between components avoids situations
+ // when we tries to construct instance with unsatisfied implicit input conditions.
+ LLPanelOutfitEdit * panel_outfit_edit =
+ dynamic_cast<LLPanelOutfitEdit*> (LLSideTray::getInstance()->getPanel(
+ "panel_outfit_edit"));
+ if (panel_outfit_edit != NULL)
+ {
+ panel_outfit_edit->showAddWearablesPanel(true);
+ }
}
/*virtual*/ LLContextMenu* createMenu()