diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-05-20 11:44:49 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-05-20 11:44:49 +0100 |
commit | ae0dbecb1c93347f7d83760117496048af3148da (patch) | |
tree | 82f1a09547b4c92bfa405b51e4683595c0cc26bb /indra/newview/llpaneloutfitsinventory.cpp | |
parent | 13d2501c847929ce9ee155dbb4dcfcf166710d3e (diff) | |
parent | 56e88c6b2e656a28b25154e27c05e7ced65d90a8 (diff) |
merge from PE's viewer-trunk
Diffstat (limited to 'indra/newview/llpaneloutfitsinventory.cpp')
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index ea75c16c56..0760c57f8e 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -73,7 +73,8 @@ static LLRegisterPanelClassWrapper<LLPanelOutfitsInventory> t_inventory("panel_o LLPanelOutfitsInventory::LLPanelOutfitsInventory() : mMyOutfitsPanel(NULL), mCurrentOutfitPanel(NULL), - mParent(NULL) + mParent(NULL), + mInitialized(false) { mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); @@ -106,6 +107,18 @@ BOOL LLPanelOutfitsInventory::postBuild() // virtual void LLPanelOutfitsInventory::onOpen(const LLSD& key) { + if (!mInitialized) + { + LLSidepanelAppearance* panel_appearance = getAppearanceSP(); + if (panel_appearance) + { + // *TODO: move these methods to LLPanelOutfitsInventory? + panel_appearance->fetchInventory(); + panel_appearance->refreshCurrentOutfitName(); + } + mInitialized = true; + } + // Make sure we know which tab is selected, update the filter, // and update verbs. onTabChange(); @@ -249,8 +262,7 @@ bool LLPanelOutfitsInventory::onSaveCommit(const LLSD& notification, const LLSD& { LLUUID outfit_folder = LLAppearanceMgr::getInstance()->makeNewOutfitLinks(outfit_name); - LLSidepanelAppearance* panel_appearance = - dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + LLSidepanelAppearance* panel_appearance = getAppearanceSP(); if (panel_appearance) { panel_appearance->showOutfitsInventoryPanel(); @@ -661,3 +673,11 @@ void LLPanelOutfitsInventory::onWearablesLoaded() { setWearablesLoading(false); } + +LLSidepanelAppearance* LLPanelOutfitsInventory::getAppearanceSP() +{ + static LLSidepanelAppearance* panel_appearance = + dynamic_cast<LLSidepanelAppearance*> + (LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + return panel_appearance; +} |