summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp14
-rw-r--r--indra/newview/llpaneloutfitsinventory.h5
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;