summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-11-13 14:42:28 -0500
committerLoren Shih <seraph@lindenlab.com>2009-11-13 14:42:28 -0500
commit0fb0ce836d286063a21c540cadbdbd12160cb9e1 (patch)
tree74195c7053663b7f8b1b67b46827b1963a3f5cac
parent3b730cef7583a77b4b42506fffb677282ddadbec (diff)
EXT-2428 : Wearing a look should update the "Current Look" sidepanel string
Both double-clicking on an outfit to wear, and wearing an outfit from side panel, will now update the current look string. --HG-- branch : avatar-pipeline
-rw-r--r--indra/newview/llappearancemgr.cpp21
-rw-r--r--indra/newview/llsidetray.cpp18
-rw-r--r--indra/newview/llsidetray.h7
3 files changed, 39 insertions, 7 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 456eaa43c6..aac0fd6088 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -32,18 +32,20 @@
#include "llviewerprecompiledheaders.h"
+#include "llagent.h"
+#include "llagentwearables.h"
#include "llappearancemgr.h"
-#include "llinventorymodel.h"
-#include "llnotifications.h"
+#include "llfloatercustomize.h"
#include "llgesturemgr.h"
#include "llinventorybridge.h"
-#include "llwearablelist.h"
-#include "llagentwearables.h"
-#include "llagent.h"
+#include "llinventorymodel.h"
+#include "llnotifications.h"
+#include "llpanelappearance.h"
+#include "llsidetray.h"
#include "llvoavatar.h"
#include "llvoavatarself.h"
#include "llviewerregion.h"
-#include "llfloatercustomize.h"
+#include "llwearablelist.h"
class LLWearInventoryCategoryCallback : public LLInventoryCallback
{
@@ -564,6 +566,13 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append)
{
link_inventory_item(gAgent.getID(), category, cof, catp->getName(),
LLAssetType::AT_LINK_FOLDER, link_waiter);
+
+ // Update the current outfit name of the appearance sidepanel.
+ LLPanelAppearance* panel_appearance = dynamic_cast<LLPanelAppearance *>(LLSideTray::getInstance()->getPanel("panel_appearance"));
+ if (panel_appearance)
+ {
+ panel_appearance->refreshCurrentLookName(catp->getName());
+ }
}
}
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 70dc04f575..7711f3c733 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -673,6 +673,24 @@ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& para
return NULL;
}
+LLPanel* LLSideTray::getPanel (const std::string& panel_name)
+{
+ child_vector_const_iter_t child_it;
+ for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
+ {
+ LLView* view = (*child_it)->findChildView(panel_name,true);
+ if(view)
+ {
+ LLPanel* panel = dynamic_cast<LLPanel*>(view);
+ if(panel)
+ {
+ return panel;
+ }
+ }
+ }
+ return NULL;
+}
+
// *TODO: Eliminate magic constants.
static const S32 fake_offset = 132;
static const S32 fake_top_offset = 18;
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index 8b30199c45..54652c1108 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -36,8 +36,8 @@
#include "llpanel.h"
#include "string"
-class LLSideTrayTab;
class LLAccordionCtrl;
+class LLSideTrayTab;
// added inheritance from LLDestroyClass<LLSideTray> to enable Side Tray perform necessary actions
// while disconnecting viewer in LLAppViewer::disconnectViewer().
@@ -97,6 +97,11 @@ public:
LLPanel* showPanel (const std::string& panel_name, const LLSD& params);
/*
+ * get the panel (don't show it or do anything else with it)
+ */
+ LLPanel* getPanel (const std::string& panel_name);
+
+ /*
* collapse SideBar, hiding visible tab and moving tab buttons
* to the right corner of the screen
*/