From a03e1231486bd5c02e27b7020f53dfd2b397c215 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 6 Jul 2010 17:00:39 +0300 Subject: EXT-8082 FIXED Fixed viewer crash in outfit list accordion. Details: 1 Avoided memory leak of LLAccordionCtrlTab in LLOutfitsList::refreshList method. 2 Provided resetting selection in LLAccordionCtrl::removeCollapsibleCtrl method. reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/701/ --HG-- branch : product-engine --- indra/newview/lloutfitslist.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/newview/lloutfitslist.cpp') diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index dddfd9106f..aba019356d 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -453,6 +453,12 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) { // Remove accordion tab if category could not be added to observer. mAccordion->removeCollapsibleCtrl(tab); + + // kill removed tab + if (tab != NULL) + { + tab->die(); + } continue; } @@ -523,6 +529,12 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) // 4. Remove outfit tab from accordion. mAccordion->removeCollapsibleCtrl(tab); + + // kill removed tab + if (tab != NULL) + { + tab->die(); + } } } -- cgit v1.2.3 From cf675389d06556ec041bfa6f4e3474c835e79c1c Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Tue, 6 Jul 2010 17:24:14 +0300 Subject: EXT-8036 FIXED Fixed opening accordion tabs if they match filter after list refresh. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/697/. --HG-- branch : product-engine --- indra/newview/lloutfitslist.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'indra/newview/lloutfitslist.cpp') diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index aba019356d..63ffb80ff2 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -901,18 +901,6 @@ void LLOutfitsList::applyFilter(const std::string& new_filter_substring) if (!new_filter_substring.empty()) { applyFilterToTab(iter->first, tab, new_filter_substring); - - if (tab->getVisible()) - { - // Open tab if it has passed the filter. - tab->setDisplayChildren(true); - } - else - { - // Set force refresh flag to refresh not visible list - // when some changes occur in it. - list->setForceRefresh(true); - } } else { @@ -965,6 +953,18 @@ void LLOutfitsList::applyFilterToTab( // Try restoring the tab selection. restoreOutfitSelection(tab, category_id); } + + if (tab->getVisible()) + { + // Open tab if it has passed the filter. + tab->setDisplayChildren(true); + } + else + { + // Set force refresh flag to refresh not visible list + // when some changes occur in it. + list->setForceRefresh(true); + } } bool LLOutfitsList::canTakeOffSelected() -- cgit v1.2.3