diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-12-17 10:20:55 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-12-17 10:20:55 -0500 |
commit | 8c5a13c3704c8f655eeb724cf03d8ceb26b2c76e (patch) | |
tree | 6b2bf503f92ba2546d4a85e6906f2b80b64f2be0 /indra/newview | |
parent | 9813df87af1d895a3183eb33648009fd70ce6ed7 (diff) |
For EXT-3500: Make InventorySP and AppearanceSP filters behave like it does in LandmarksSP and PeopleSP. This covers the InventorySP part.
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llpanelmaininventory.h | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index c0da8f3daa..961d3dec8b 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -400,6 +400,7 @@ void LLPanelMainInventory::onClearSearch() mActivePanel->getRootFolder()->applyFunctorRecursively(opener); mActivePanel->getRootFolder()->scrollToShowSelection(); } + mFilterSubString = ""; } void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) @@ -417,6 +418,7 @@ 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 @@ -431,7 +433,7 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) } // set new filter string - mActivePanel->setFilterSubString(uppercase_search_string); + mActivePanel->setFilterSubString(mFilterSubString); } @@ -484,6 +486,7 @@ void LLPanelMainInventory::onFilterSelected() { return; } + setFilterSubString(mFilterSubString); LLInventoryFilter* filter = mActivePanel->getFilter(); LLFloaterInventoryFinder *finder = getFinder(); if (finder) @@ -542,7 +545,7 @@ void LLPanelMainInventory::draw() { if (mActivePanel && mFilterEditor) { - mFilterEditor->setText(mActivePanel->getFilterSubString()); + mFilterEditor->setText(mFilterSubString); } LLPanel::draw(); } @@ -1016,9 +1019,11 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) } 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); diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index 920de2665c..69f8a14583 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -123,6 +123,7 @@ private: LLInventoryPanel* mActivePanel; LLSaveFolderState* mSavedFolderState; std::string mFilterText; + std::string mFilterSubString; ////////////////////////////////////////////////////////////////////////////////// |