diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 7baeffab6626c390ba477b9c739f563ddbf2ccb0..c6a7bd88a0421547363e52c3b972eaa2eba6189e 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -42,16 +42,9 @@ #include "llsidepanelappearance.h" #include "llsidetray.h" #include "llviewerfoldertype.h" -// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) -#include "rlvhandler.h" -// [/RLVa:KB] - -//static const std::string OUTFITS_TAB_NAME = "outfitslist_tab"; -//static const std::string COF_TAB_NAME = "cof_tab"; -// [RLVa:KB] - Checked: 2010-02-28 (RLVa-1.2.0a) | Added: RLVa-1.2.0a -const std::string OUTFITS_TAB_NAME = "outfitslist_tab"; -const std::string COF_TAB_NAME = "cof_tab"; -// [/RLVa:KB] + +static const std::string OUTFITS_TAB_NAME = "outfitslist_tab"; +static const std::string COF_TAB_NAME = "cof_tab"; static LLRegisterPanelClassWrapper<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory"); diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index 48eb729350dbf4f1a9f7b71b11814297b4f8c0ac..a6443c4dca75d0665e974ee0fd4cdf3801012cfd 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -39,11 +39,6 @@ class LLSidepanelAppearance; class LLTabContainer; class LLSaveOutfitComboBtn; -// [RLVa:KB] - Checked: 2010-02-28 (RLVa-1.2.0a) | Added: RLVa-1.2.0a -extern const std::string OUTFITS_TAB_NAME; -extern const std::string COF_TAB_NAME; -// [/RLVa:KB] - class LLPanelOutfitsInventory : public LLPanel { LOG_CLASS(LLPanelOutfitsInventory); @@ -61,6 +56,12 @@ public: static LLSidepanelAppearance* getAppearanceSP(); +// [RLVa:KB] - Checked: 2010-08-24 (RLVa-1.2.1a) | Added: RLVa-1.2.1a + LLTabContainer* getAppearanceTabs() { return mAppearanceTabs; } + LLOutfitsList* getMyOutfitsPanel() { return mMyOutfitsPanel; } + LLPanelWearing* getCurrentOutfitPanel() { return mCurrentOutfitPanel; } +// [/RLVa:KB] + static LLPanelOutfitsInventory* findInstance(); protected: diff --git a/indra/newview/rlvui.cpp b/indra/newview/rlvui.cpp index 1100ef60e5e7b685f93c0e49b9a3e1e1a38c76c8..def9beb41210688ed6273527a0975760ab86532b 100644 --- a/indra/newview/rlvui.cpp +++ b/indra/newview/rlvui.cpp @@ -24,9 +24,11 @@ #include "llmoveview.h" // Movement panel (contains "Stand" and "Stop Flying" buttons) #include "llnavigationbar.h" // Navigation bar #include "llnotificationsutil.h" +#include "lloutfitslist.h" // "My Outfits" sidebar panel #include "llpaneloutfitsinventory.h" // "My Appearance" sidebar panel #include "llpanelpeople.h" // "People" sidebar panel #include "llpanelprofile.h" // "Profile" sidebar panel +#include "llpanelwearing.h" // "Current Outfit" sidebar panel #include "llparcel.h" #include "llsidetray.h" #include "llsidetraypanelcontainer.h" @@ -166,7 +168,7 @@ void RlvUIEnabler::onToggleSetEnv() } } -// Checked: 2010-03-01 (RLVa-1.2.0b) | Added: RLVa-1.2.0a +// Checked: 2010-08-24 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a void RlvUIEnabler::onToggleShowInv() { bool fEnable = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV); @@ -204,22 +206,20 @@ void RlvUIEnabler::onToggleShowInv() // // Enable/disable the "My Outfits" panel on the "My Appearance" sidebar tab // - LLPanelOutfitsInventory* pAppearancePanel = - dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); - RLV_ASSERT(pAppearancePanel); + LLPanelOutfitsInventory* pAppearancePanel = LLPanelOutfitsInventory::findInstance(); if (pAppearancePanel) { - LLTabContainer* pAppearanceTabs = pAppearancePanel->getChild<LLTabContainer>("appearance_tabs"); - LLInventoryPanel* pOutfitsPanel = pAppearancePanel->getChild<LLInventoryPanel>(OUTFITS_TAB_NAME); - RLV_ASSERT( (pAppearanceTabs) && (pOutfitsPanel) ); - if ( (pAppearanceTabs) && (pOutfitsPanel) ) + LLTabContainer* pAppearanceTabs = pAppearancePanel->getAppearanceTabs(); + LLOutfitsList* pMyOutfitsPanel = pAppearancePanel->getMyOutfitsPanel(); + if ( (pAppearanceTabs) && (pMyOutfitsPanel) ) { - S32 idxTab = pAppearanceTabs->getIndexForPanel(pOutfitsPanel); + S32 idxTab = pAppearanceTabs->getIndexForPanel(pMyOutfitsPanel); + RLV_ASSERT(-1 != idxTab); pAppearanceTabs->enableTabButton(idxTab, fEnable); // When disabling, switch to the COF tab if "My Outfits" is currently active if ( (!fEnable) && (pAppearanceTabs->getCurrentPanelIndex() == idxTab) ) - pAppearanceTabs->selectTabByName(COF_TAB_NAME); + pAppearanceTabs->selectTabPanel(pAppearancePanel->getCurrentOutfitPanel()); } }