summaryrefslogtreecommitdiff
path: root/indra/newview/lloutfitslist.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-01-04 16:46:25 -0800
committerRichard Linden <none@none>2013-01-04 16:46:25 -0800
commit0d8f1077a62099915cb532dc354d0e450e3e6a79 (patch)
treef76f43d025304bc6aa65d3f91663cac67a6715cc /indra/newview/lloutfitslist.cpp
parent0d12d171cf20c63a45e7ad0989e65d05aabb86ea (diff)
parent7dbb8860373769dfca7d6c6588284866a1bf86a3 (diff)
Automated merge with http://bitbucket.org/lindenlab/viewer-development
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);