diff options
Diffstat (limited to 'indra/newview/llpanellandmarks.cpp')
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 4ce6d14faa..d731da0ec7 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -122,8 +122,7 @@ void LLLandmarksPanel::onSearchEdit(const std::string& string) for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter) { LLAccordionCtrlTab* tab = *iter; - if (tab && !tab->getVisible()) - tab->setVisible(TRUE); + tab->setVisible(TRUE); // expand accordion to see matched items in each one. See EXT-2014. tab->changeOpenClose(false); @@ -132,7 +131,9 @@ void LLLandmarksPanel::onSearchEdit(const std::string& string) if (NULL == inventory_list) continue; if (inventory_list->getFilter()) + { filter_list(inventory_list, string); + } } if (sFilterSubString != string) @@ -333,8 +334,12 @@ void LLLandmarksPanel::initLandmarksInventoryPanel() initLandmarksPanel(mLandmarksInventoryPanel); + // Check if mLandmarksInventoryPanel is properly initialized and has a Filter created. + // In case of a dummy widget getFilter() will return NULL. if (mLandmarksInventoryPanel->getFilter()) + { mLandmarksInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_ALL_FOLDERS); + } // subscribe to have auto-rename functionality while creating New Folder mLandmarksInventoryPanel->setSelectCallback(boost::bind(&LLInventoryPanel::onSelectionChange, mLandmarksInventoryPanel, _1, _2)); @@ -362,6 +367,8 @@ void LLLandmarksPanel::initLibraryInventoryPanel() void LLLandmarksPanel::initLandmarksPanel(LLInventorySubTreePanel* inventory_list) { + // In case of a dummy widget further we have no Folder View widget and no Filter, + // so further initialization leads to crash. if (!inventory_list->getFilter()) return; @@ -388,8 +395,6 @@ void LLLandmarksPanel::initLandmarksPanel(LLInventorySubTreePanel* inventory_lis void LLLandmarksPanel::initAccordion(const std::string& accordion_tab_name, LLInventorySubTreePanel* inventory_list) { LLAccordionCtrlTab* accordion_tab = getChild<LLAccordionCtrlTab>(accordion_tab_name); - if (!accordion_tab) - return; mAccordionTabs.push_back(accordion_tab); accordion_tab->setDropDownStateChangedCallback( @@ -744,8 +749,8 @@ void LLLandmarksPanel::updateFilteredAccordions() for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter) { accordion_tab = *iter; - if (accordion_tab && !accordion_tab->getVisible()) - accordion_tab->setVisible(TRUE); + + accordion_tab->setVisible(TRUE); inventory_list = dynamic_cast<LLInventorySubTreePanel*> (accordion_tab->getAccordionView()); if (NULL == inventory_list) continue; |