summaryrefslogtreecommitdiff
path: root/indra/newview/llpanellandmarks.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-04 13:50:32 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-04 13:50:32 -0500
commitc9c9943098d35914f7b8591bf66ea1ae3985a94e (patch)
treedaa74a4288a0e5e5c028717e0b925633c11eac5b /indra/newview/llpanellandmarks.cpp
parent92a1ecd5fdfff2490cb563e83baff88fc6120882 (diff)
parent5b695ac56a7fbbb4d1f63bccb0c147c46e56ebcf (diff)
automated merge viewer2.0->avp
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llpanellandmarks.cpp')
-rw-r--r--indra/newview/llpanellandmarks.cpp17
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;