summaryrefslogtreecommitdiff
path: root/indra/newview/lloutfitslist.cpp
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2012-08-22 11:42:44 +0300
committermaxim_productengine <mnikolenko@productengine.com>2012-08-22 11:42:44 +0300
commitf93b94daa978e1bcf1897e0459fa8700f58d62d1 (patch)
tree98a5fa6e92b82f6b125c985fa92bb1bfa208a35d /indra/newview/lloutfitslist.cpp
parent4b44be799a578b946e440a4bc90aca0610734003 (diff)
MAINT-56 FIXED collapse_all_folders() and expand_all_folders() functions are added, which are called by menu items in gear menu.
Diffstat (limited to 'indra/newview/lloutfitslist.cpp')
-rw-r--r--indra/newview/lloutfitslist.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index ef5ef2ddc8..c15b6bd0d3 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -117,6 +117,8 @@ public:
registrar.add("Gear.Rename", boost::bind(&LLOutfitListGearMenu::onRename, this));
registrar.add("Gear.Delete", boost::bind(&LLOutfitsList::removeSelected, mOutfitList));
registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2));
+ registrar.add("Gear.Collapse", boost::bind(&LLOutfitsList::collapse_all_folders, mOutfitList));
+ registrar.add("Gear.Expand", boost::bind(&LLOutfitsList::expand_all_folders, mOutfitList));
registrar.add("Gear.WearAdd", boost::bind(&LLOutfitListGearMenu::onAdd, this));
@@ -743,6 +745,34 @@ void LLOutfitsList::getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const
}
}
+void LLOutfitsList::collapse_all_folders()
+{
+ for (outfits_map_t::iterator iter = mOutfitsMap.begin();
+ iter != mOutfitsMap.end();
+ ++iter)
+ {
+ LLAccordionCtrlTab* tab = iter->second;
+ if(tab && tab->isExpanded())
+ {
+ tab->changeOpenClose(true);
+ }
+ }
+}
+
+void LLOutfitsList::expand_all_folders()
+{
+ for (outfits_map_t::iterator iter = mOutfitsMap.begin();
+ iter != mOutfitsMap.end();
+ ++iter)
+ {
+ LLAccordionCtrlTab* tab = iter->second;
+ if(tab && !tab->isExpanded())
+ {
+ tab->changeOpenClose(false);
+ }
+ }
+}
+
boost::signals2::connection LLOutfitsList::setSelectionChangeCallback(selection_change_callback_t cb)
{
return mSelectionChangeSignal.connect(cb);