For EXT-3500: Make InventorySP and AppearanceSP filters behave like it does in LandmarksSP and PeopleSP. This covers AppearanceSP

--HG--
branch : avatar-pipeline
meow-7.2.2
Brad Payne (Vir Linden) 2009-12-17 13:07:16 -05:00
parent 8c5a13c370
commit bc2b796811
2 changed files with 18 additions and 1 deletions

View File

@ -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;

View File

@ -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;