summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2010-07-01 19:52:14 +0300
committerAlexei Arabadji <aarabadji@productengine.com>2010-07-01 19:52:14 +0300
commit8b38c0e49df9d0bdc42253563dcc47cfac364020 (patch)
treeb7d80e05b80023d4c82ead7bda7f6cabdf55ef6a
parentaf4a85009011119e7787e2b30416919117edccf9 (diff)
EXT-8158 FIXED Replaced toggling with show functionality of outfit edit panel.
reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/677/ --HG-- branch : product-engine
-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()