Commits

VirLinden committed ff321e5

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

Comments (0)

Files changed (2)

indra/newview/llpanelmaininventory.cpp

 		mActivePanel->getRootFolder()->applyFunctorRecursively(opener);
 		mActivePanel->getRootFolder()->scrollToShowSelection();
 	}
+	mFilterSubString = "";
 }
 
 void LLPanelMainInventory::onFilterEdit(const std::string& search_string )
 
 	std::string uppercase_search_string = search_string;
 	LLStringUtil::toUpper(uppercase_search_string);
+	mFilterSubString = uppercase_search_string;
 	if (mActivePanel->getFilterSubString().empty() && uppercase_search_string.empty())
 	{
 			// current filter and new filter empty, do nothing
 	}
 
 	// set new filter string
-	mActivePanel->setFilterSubString(uppercase_search_string);
+	mActivePanel->setFilterSubString(mFilterSubString);
 }
 
 
 	{
 		return;
 	}
+	setFilterSubString(mFilterSubString);
 	LLInventoryFilter* filter = mActivePanel->getFilter();
 	LLFloaterInventoryFinder *finder = getFinder();
 	if (finder)
 {
 	if (mActivePanel && mFilterEditor)
 	{
-		mFilterEditor->setText(mActivePanel->getFilterSubString());
+		mFilterEditor->setText(mFilterSubString);
 	}	
 	LLPanel::draw();
 }
 		}
 		const LLUUID& item_id = current_item->getListener()->getUUID();
 		const std::string &item_name = current_item->getListener()->getName();
+		mFilterSubString = item_name;
 		LLInventoryFilter *filter = mActivePanel->getFilter();
 		filter->setFilterSubString(item_name);
 		mFilterEditor->setText(item_name);
+
 		mFilterEditor->setFocus(TRUE);
 		filter->setFilterUUID(item_id);
 		filter->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);

indra/newview/llpanelmaininventory.h

 	LLInventoryPanel*			mActivePanel;
 	LLSaveFolderState*			mSavedFolderState;
 	std::string					mFilterText;
+	std::string					mFilterSubString;
 
 
 	//////////////////////////////////////////////////////////////////////////////////