diff options
-rwxr-xr-x | indra/newview/llpanelmaininventory.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index b02298090a..90dfb24377 100755 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -382,9 +382,11 @@ BOOL LLPanelMainInventory::filtersVisible(void* user_data) void LLPanelMainInventory::onClearSearch() { + BOOL initially_active = FALSE; LLFloater *finder = getFinder(); if (mActivePanel) { + initially_active = mActivePanel->getFilter().isNotDefault(); mActivePanel->setFilterSubString(LLStringUtil::null); mActivePanel->setFilterTypes(0xffffffffffffffffULL); mActivePanel->setFilterLinks(LLInventoryFilter::FILTERLINK_INCLUDE_LINKS); @@ -395,8 +397,8 @@ void LLPanelMainInventory::onClearSearch() LLFloaterInventoryFinder::selectAllTypes(finder); } - // re-open folders that were initially open - if (mActivePanel) + // re-open folders that were initially open in case filter was active + if (mActivePanel && (mFilterSubString.size() || initially_active)) { mSavedFolderState->setApply(TRUE); mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); |