summaryrefslogtreecommitdiff
path: root/indra/newview/llsidepanelappearance.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-12-09 13:42:07 -0800
committerJames Cook <james@lindenlab.com>2009-12-09 13:42:07 -0800
commit7466aa198a7707f2acadacfb6709bed8351fff96 (patch)
tree080671ab4d66607d0071e777993f1cb0c6356ec8 /indra/newview/llsidepanelappearance.cpp
parent1c0b5d4435e30dbfa5865ad212b3ca2a391d43ee (diff)
parent6260ce6a9210192963a77e5b1f44b0d2c2c86591 (diff)
Merge
Diffstat (limited to 'indra/newview/llsidepanelappearance.cpp')
-rw-r--r--indra/newview/llsidepanelappearance.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index d5f01418c6..eb3695a371 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -67,6 +67,26 @@ private:
LLSidepanelAppearance *mPanel;
};
+class LLWatchForOutfitRenameObserver : public LLInventoryObserver
+{
+public:
+ LLWatchForOutfitRenameObserver(LLSidepanelAppearance *panel) :
+ mPanel(panel)
+ {}
+ virtual void changed(U32 mask);
+
+private:
+ LLSidepanelAppearance *mPanel;
+};
+
+void LLWatchForOutfitRenameObserver::changed(U32 mask)
+{
+ if (mask & LABEL)
+ {
+ mPanel->refreshCurrentOutfitName();
+ }
+}
+
LLSidepanelAppearance::LLSidepanelAppearance() :
LLPanel(),
mFilterSubString(LLStringUtil::null),
@@ -76,6 +96,8 @@ LLSidepanelAppearance::LLSidepanelAppearance() :
{
//LLUICtrlFactory::getInstance()->buildPanel(this, "panel_appearance.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder()
mFetchWorn = new LLCurrentlyWornFetchObserver(this);
+
+ mOutfitRenameWatcher = new LLWatchForOutfitRenameObserver(this);
}
LLSidepanelAppearance::~LLSidepanelAppearance()
@@ -135,6 +157,8 @@ BOOL LLSidepanelAppearance::postBuild()
mCurrOutfitPanel = getChild<LLPanel>("panel_currentlook");
+ gInventory.addObserver(mOutfitRenameWatcher);
+
return TRUE;
}
@@ -299,7 +323,7 @@ void LLSidepanelAppearance::updateVerbs()
}
}
-void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string name)
+void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name)
{
if (name == "")
{