diff options
Diffstat (limited to 'indra/newview/llpanellandmarks.cpp')
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 65056b00d6..32c9faa688 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -366,7 +366,7 @@ void LLLandmarksPanel::initFavoritesInventoryPanel() mFavoritesInventoryPanel = getChild<LLInventorySubTreePanel>("favorites_list"); initLandmarksPanel(mFavoritesInventoryPanel); - + mFavoritesInventoryPanel->getFilter()->setEmptyLookupMessage("FavoritesNoMatchingItems"); initAccordion("tab_favorites", mFavoritesInventoryPanel); } @@ -428,10 +428,6 @@ void LLLandmarksPanel::initLandmarksPanel(LLInventorySubTreePanel* inventory_lis } root_folder->setParentLandmarksPanel(this); - - // save initial folder state to avoid incorrect work while switching between Landmarks & Teleport History tabs - // See EXT-1609. - inventory_list->saveFolderState(); } void LLLandmarksPanel::initAccordion(const std::string& accordion_tab_name, LLInventorySubTreePanel* inventory_list) @@ -1034,30 +1030,24 @@ void LLLandmarksPanel::doCreatePick(LLLandmark* landmark) ////////////////////////////////////////////////////////////////////////// static void filter_list(LLInventorySubTreePanel* inventory_list, const std::string& string) { + // Open the immediate children of the root folder, since those + // are invisible in the UI and thus must always be open. + inventory_list->getRootFolder()->openTopLevelFolders(); + if (string == "") { inventory_list->setFilterSubString(LLStringUtil::null); - - // re-open folders that were initially open - inventory_list->restoreFolderState(); } - gInventory.startBackgroundFetch(); - if (inventory_list->getFilterSubString().empty() && string.empty()) { // current filter and new filter empty, do nothing return; } - // save current folder open state if no filter currently applied - if (inventory_list->getRootFolder()->getFilterSubString().empty()) - { - inventory_list->saveFolderState(); - } - - // set new filter string + // Set new filter string inventory_list->setFilterSubString(string); + } static void save_folder_state_if_no_filter(LLInventorySubTreePanel* inventory_list) @@ -1065,7 +1055,7 @@ static void save_folder_state_if_no_filter(LLInventorySubTreePanel* inventory_li // save current folder open state if no filter currently applied if (inventory_list->getRootFolder() && inventory_list->getRootFolder()->getFilterSubString().empty()) { - inventory_list->saveFolderState(); + // inventory_list->saveFolderState(); // *TODO: commented out to fix build } } // EOF |