diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-12-17 13:07:16 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-12-17 13:07:16 -0500 |
commit | bc2b79681101facc3d913cab3ebf8e43edc98b8e (patch) | |
tree | a55681657a08d72080eaa5bc428741e17b4067c6 /indra | |
parent | 8c5a13c3704c8f655eeb724cf03d8ceb26b2c76e (diff) |
For EXT-3500: Make InventorySP and AppearanceSP filters behave like it does in LandmarksSP and PeopleSP. This covers AppearanceSP
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.h | 5 |
2 files changed, 18 insertions, 1 deletions
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 5b36a5406a..f73c1363f6 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -96,6 +96,7 @@ void LLPanelOutfitsInventory::setParent(LLSidepanelAppearance* parent) // virtual void LLPanelOutfitsInventory::onSearchEdit(const std::string& string) { + mFilterSubString = string; if (string == "") { mActivePanel->setFilterSubString(LLStringUtil::null); @@ -433,6 +434,9 @@ void LLPanelOutfitsInventory::initTabPanels() LLInventoryPanel *panel = (*iter); panel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onTabSelectionChange, this, panel, _1, _2)); } + + mAppearanceTabs = getChild<LLTabContainer>("appearance_tabs"); + mAppearanceTabs->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::onTabChange, this)); } void LLPanelOutfitsInventory::onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action) @@ -457,6 +461,16 @@ void LLPanelOutfitsInventory::onTabSelectionChange(LLInventoryPanel* tab_panel, onSelectionChange(items, user_action); } +void LLPanelOutfitsInventory::onTabChange() +{ + mActivePanel = (LLInventoryPanel*)childGetVisibleTab("appearance_tabs"); + if (!mActivePanel) + { + return; + } + mActivePanel->setFilterSubString(mFilterSubString); +} + LLInventoryPanel* LLPanelOutfitsInventory::getActivePanel() { return mActivePanel; diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index 9b6b483e3b..b4babc853d 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -44,6 +44,7 @@ class LLSaveFolderState; class LLButton; class LLMenuGL; class LLSidepanelAppearance; +class LLTabContainer; class LLPanelOutfitsInventory : public LLPanel { @@ -76,7 +77,8 @@ protected: private: LLSidepanelAppearance* mParent; LLSaveFolderState* mSavedFolderState; - + LLTabContainer* mAppearanceTabs; + std::string mFilterSubString; public: ////////////////////////////////////////////////////////////////////////////////// @@ -87,6 +89,7 @@ public: protected: void initTabPanels(); void onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action); + void onTabChange(); private: LLInventoryPanel* mActivePanel; |