From ca4c69b04db6a9b8385e7a531f565d197d83e765 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 13 Jun 2012 20:30:28 +0200 Subject: [PATCH] Fix for landmark search on places panel not working properly (FIRE-6611) --- indra/newview/llpanellandmarks.cpp | 54 ++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 71bfc11a75..6ca5605513 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -235,26 +235,46 @@ BOOL LLLandmarksPanel::postBuild() // virtual void LLLandmarksPanel::onSearchEdit(const std::string& string) { + // Fix for landmark search (FIRE-6611): We don't have + // accordion tabs but normal tabs! // give FolderView a chance to be refreshed. So, made all accordions visible - for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter) + //for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter) + //{ + // LLAccordionCtrlTab* tab = *iter; + // tab->setVisible(TRUE); + + // // expand accordion to see matched items in each one. See EXT-2014. + // if (string != "") + // { + // tab->changeOpenClose(false); + // } + + // LLPlacesInventoryPanel* inventory_list = dynamic_cast(tab->getAccordionView()); + // if (NULL == inventory_list) continue; + + // if (inventory_list->getFilter()) + // { + // filter_list(inventory_list, string); + // } + //} + + if (mFavoritesInventoryPanel && mFavoritesInventoryPanel->getFilter()) { - LLAccordionCtrlTab* tab = *iter; - tab->setVisible(TRUE); - - // expand accordion to see matched items in each one. See EXT-2014. - if (string != "") - { - tab->changeOpenClose(false); - } - - LLPlacesInventoryPanel* inventory_list = dynamic_cast(tab->getAccordionView()); - if (NULL == inventory_list) continue; - - if (inventory_list->getFilter()) - { - filter_list(inventory_list, string); - } + filter_list(mFavoritesInventoryPanel, string); } + if (mLandmarksInventoryPanel && mLandmarksInventoryPanel->getFilter()) + { + filter_list(mLandmarksInventoryPanel, string); + } + if (mMyInventoryPanel && mMyInventoryPanel->getFilter()) + { + filter_list(mMyInventoryPanel, string); + } + if (mLibraryInventoryPanel && mLibraryInventoryPanel->getFilter()) + { + filter_list(mLibraryInventoryPanel, string); + } + // Fix for landmark search (FIRE-6611) if (sFilterSubString != string) sFilterSubString = string;