Commits

VirLinden committed d7ab716

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

  • Participants
  • Parent commits ff321e5
  • Branches avatar-pipeline

Comments (0)

Files changed (2)

indra/newview/llpaneloutfitsinventory.cpp

 // virtual
 void LLPanelOutfitsInventory::onSearchEdit(const std::string& string)
 {
+	mFilterSubString = string;
 	if (string == "")
 	{
 		mActivePanel->setFilterSubString(LLStringUtil::null);
 		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)
 	onSelectionChange(items, user_action);
 }
 
+void LLPanelOutfitsInventory::onTabChange()
+{
+	mActivePanel = (LLInventoryPanel*)childGetVisibleTab("appearance_tabs");
+	if (!mActivePanel)
+	{
+		return;
+	}
+	mActivePanel->setFilterSubString(mFilterSubString);
+}
+
 LLInventoryPanel* LLPanelOutfitsInventory::getActivePanel()
 {
 	return mActivePanel;

indra/newview/llpaneloutfitsinventory.h

 class LLButton;
 class LLMenuGL;
 class LLSidepanelAppearance;
+class LLTabContainer;
 
 class LLPanelOutfitsInventory : public LLPanel
 {
 private:
 	LLSidepanelAppearance*      mParent;
 	LLSaveFolderState*			mSavedFolderState;
-
+	LLTabContainer*				mAppearanceTabs;
+	std::string 				mFilterSubString;
 
 public:
 	//////////////////////////////////////////////////////////////////////////////////
 protected:
 	void 				initTabPanels();
 	void 				onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action);
+	void 				onTabChange();
 	
 private:
 	LLInventoryPanel* 	mActivePanel;