diff options
author | Sergei Litovchuk <slitovchuk@productengine.com> | 2009-12-03 16:16:21 +0200 |
---|---|---|
committer | Sergei Litovchuk <slitovchuk@productengine.com> | 2009-12-03 16:16:21 +0200 |
commit | fe284981abacbd4fa18db7b87fc76289057d3851 (patch) | |
tree | dc44b2cc2f553315096f4e1500e5b9716b712b29 /indra/newview/llpanellandmarks.cpp | |
parent | ec48cc1a40fc189de379ca3dd198e3b96395ce33 (diff) |
Fixed normal bug EXT-3004 "Created landmark isn't saved in "Favorite" folder and isn't shown in "Fav" bar".
- Added enabling "Save" landmark button only after landmark is loaded.
Minor cleanup of fix for EXT-2346 "My Landmarks accordion panels shouldn't
be displayed if there are no landmarks in respective folders".
--HG--
branch : product-engine
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; |