summaryrefslogtreecommitdiff
path: root/indra/newview/llcofwearables.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-10-25 09:34:06 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-10-25 09:34:06 -0400
commit7c08ddb3f748d2173948335fd799879e3d58d81c (patch)
tree1f72cc9ec78d7b8c4bad57f4ef14c12a04b7a3a0 /indra/newview/llcofwearables.cpp
parent1f172281453171175dea76fc469a358e1e932b60 (diff)
parent444bdef6d4949b6381b8706ab056588bc6bd88eb (diff)
merge
Diffstat (limited to 'indra/newview/llcofwearables.cpp')
-rw-r--r--indra/newview/llcofwearables.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index 254c0adef1..54598f90c8 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -33,6 +33,7 @@
#include "llagentdata.h"
#include "llagentwearables.h"
#include "llappearancemgr.h"
+#include "llfloatersidepanelcontainer.h"
#include "llinventory.h"
#include "llinventoryfunctions.h"
#include "lllistcontextmenu.h"
@@ -40,7 +41,6 @@
#include "llviewermenu.h"
#include "llwearableitemslist.h"
#include "llpaneloutfitedit.h"
-#include "llsidetray.h"
#include "lltrans.h"
static LLRegisterPanelClassWrapper<LLCOFWearables> t_cof_wearables("cof_wearables");
@@ -159,13 +159,8 @@ public:
protected:
static void replaceWearable(const LLUUID& item_id)
{
- // *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(
+ dynamic_cast<LLPanelOutfitEdit*> (LLFloaterSidePanelContainer::getPanel("appearance",
"panel_outfit_edit"));
if (panel_outfit_edit != NULL)
{
@@ -235,9 +230,7 @@ protected:
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
LLUUID selected_id = mUUIDs.back();
- // *HACK* need to pass pointer to LLPanelOutfitEdit instead of LLSideTray::getInstance()->getPanel().
- // LLSideTray::getInstance()->getPanel() is rather slow variant
- LLPanelOutfitEdit* panel_oe = dynamic_cast<LLPanelOutfitEdit*>(LLSideTray::getInstance()->getPanel("panel_outfit_edit"));
+ LLPanelOutfitEdit* panel_oe = dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit"));
registrar.add("BodyPart.Replace", boost::bind(&LLPanelOutfitEdit::onReplaceMenuItemClicked, panel_oe, selected_id));
registrar.add("BodyPart.Edit", boost::bind(LLAgentWearables::editWearable, selected_id));
registrar.add("BodyPart.Create", boost::bind(&CofBodyPartContextMenu::createNew, this, selected_id));