Skip to content
Snippets Groups Projects
Commit f01a8c4d authored by Kitty Barnett's avatar Kitty Barnett
Browse files

- fixed : @showinv=n doesn't disable the "My Outfits" panel under the...

- fixed : @showinv=n doesn't disable the "My Outfits" panel under the "Appearance" sidebar tab anymore
    -> SL-2.1 changed the "My Outfits" panel from LLInventoryPanel to LLOutfitsList

--HG--
branch : RLVa
parent bd839a06
No related branches found
No related tags found
No related merge requests found
...@@ -42,16 +42,9 @@ ...@@ -42,16 +42,9 @@
#include "llsidepanelappearance.h" #include "llsidepanelappearance.h"
#include "llsidetray.h" #include "llsidetray.h"
#include "llviewerfoldertype.h" #include "llviewerfoldertype.h"
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f)
#include "rlvhandler.h" static const std::string OUTFITS_TAB_NAME = "outfitslist_tab";
// [/RLVa:KB] static const std::string COF_TAB_NAME = "cof_tab";
//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 LLRegisterPanelClassWrapper<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory"); static LLRegisterPanelClassWrapper<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory");
......
...@@ -39,11 +39,6 @@ class LLSidepanelAppearance; ...@@ -39,11 +39,6 @@ class LLSidepanelAppearance;
class LLTabContainer; class LLTabContainer;
class LLSaveOutfitComboBtn; 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 class LLPanelOutfitsInventory : public LLPanel
{ {
LOG_CLASS(LLPanelOutfitsInventory); LOG_CLASS(LLPanelOutfitsInventory);
...@@ -61,6 +56,12 @@ public: ...@@ -61,6 +56,12 @@ public:
static LLSidepanelAppearance* getAppearanceSP(); 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(); static LLPanelOutfitsInventory* findInstance();
protected: protected:
......
...@@ -24,9 +24,11 @@ ...@@ -24,9 +24,11 @@
#include "llmoveview.h" // Movement panel (contains "Stand" and "Stop Flying" buttons) #include "llmoveview.h" // Movement panel (contains "Stand" and "Stop Flying" buttons)
#include "llnavigationbar.h" // Navigation bar #include "llnavigationbar.h" // Navigation bar
#include "llnotificationsutil.h" #include "llnotificationsutil.h"
#include "lloutfitslist.h" // "My Outfits" sidebar panel
#include "llpaneloutfitsinventory.h" // "My Appearance" sidebar panel #include "llpaneloutfitsinventory.h" // "My Appearance" sidebar panel
#include "llpanelpeople.h" // "People" sidebar panel #include "llpanelpeople.h" // "People" sidebar panel
#include "llpanelprofile.h" // "Profile" sidebar panel #include "llpanelprofile.h" // "Profile" sidebar panel
#include "llpanelwearing.h" // "Current Outfit" sidebar panel
#include "llparcel.h" #include "llparcel.h"
#include "llsidetray.h" #include "llsidetray.h"
#include "llsidetraypanelcontainer.h" #include "llsidetraypanelcontainer.h"
...@@ -166,7 +168,7 @@ void RlvUIEnabler::onToggleSetEnv() ...@@ -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() void RlvUIEnabler::onToggleShowInv()
{ {
bool fEnable = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV); bool fEnable = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV);
...@@ -204,22 +206,20 @@ void RlvUIEnabler::onToggleShowInv() ...@@ -204,22 +206,20 @@ void RlvUIEnabler::onToggleShowInv()
// //
// Enable/disable the "My Outfits" panel on the "My Appearance" sidebar tab // Enable/disable the "My Outfits" panel on the "My Appearance" sidebar tab
// //
LLPanelOutfitsInventory* pAppearancePanel = LLPanelOutfitsInventory* pAppearancePanel = LLPanelOutfitsInventory::findInstance();
dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory"));
RLV_ASSERT(pAppearancePanel);
if (pAppearancePanel) if (pAppearancePanel)
{ {
LLTabContainer* pAppearanceTabs = pAppearancePanel->getChild<LLTabContainer>("appearance_tabs"); LLTabContainer* pAppearanceTabs = pAppearancePanel->getAppearanceTabs();
LLInventoryPanel* pOutfitsPanel = pAppearancePanel->getChild<LLInventoryPanel>(OUTFITS_TAB_NAME); LLOutfitsList* pMyOutfitsPanel = pAppearancePanel->getMyOutfitsPanel();
RLV_ASSERT( (pAppearanceTabs) && (pOutfitsPanel) ); if ( (pAppearanceTabs) && (pMyOutfitsPanel) )
if ( (pAppearanceTabs) && (pOutfitsPanel) )
{ {
S32 idxTab = pAppearanceTabs->getIndexForPanel(pOutfitsPanel); S32 idxTab = pAppearanceTabs->getIndexForPanel(pMyOutfitsPanel);
RLV_ASSERT(-1 != idxTab);
pAppearanceTabs->enableTabButton(idxTab, fEnable); pAppearanceTabs->enableTabButton(idxTab, fEnable);
// When disabling, switch to the COF tab if "My Outfits" is currently active // When disabling, switch to the COF tab if "My Outfits" is currently active
if ( (!fEnable) && (pAppearanceTabs->getCurrentPanelIndex() == idxTab) ) if ( (!fEnable) && (pAppearanceTabs->getCurrentPanelIndex() == idxTab) )
pAppearanceTabs->selectTabByName(COF_TAB_NAME); pAppearanceTabs->selectTabPanel(pAppearancePanel->getCurrentOutfitPanel());
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment