diff options
author | Merov Linden <merov@lindenlab.com> | 2015-05-29 17:11:37 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2015-05-29 17:11:37 -0700 |
commit | 5cd0e7cf9065efc8402637d25d9bdae2eba44478 (patch) | |
tree | a28a25a58426ef698fc506559a0192d3e921c753 /indra/newview/llinventoryfunctions.cpp | |
parent | dad6f5d29f09955ad3fef243d52de9636a03fb53 (diff) | |
parent | f3c58f765c0168f25bb13c4427e34b4bdad2f671 (diff) |
Pull merge from lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rwxr-xr-x | indra/newview/llinventoryfunctions.cpp | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 68fb44ea50..6f6777bd8f 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -45,6 +45,7 @@ // newview includes #include "llappearancemgr.h" #include "llappviewer.h" +#include "llavataractions.h" #include "llclipboard.h" #include "lldonotdisturbnotificationstorage.h" #include "llfloaterinventory.h" @@ -2462,16 +2463,35 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root LLFloater::setFloaterHost(multi_propertiesp); } - std::set<LLFolderViewItem*>::iterator set_iter; - - for (set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter) - { - LLFolderViewItem* folder_item = *set_iter; - if(!folder_item) continue; - LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getViewModelItem(); - if(!bridge) continue; - bridge->performAction(model, action); - } + + std::set<LLUUID> selected_uuid_set = LLAvatarActions::getInventorySelectedUUIDs(); + uuid_vec_t ids; + std::copy(selected_uuid_set.begin(), selected_uuid_set.end(), std::back_inserter(ids)); + // Check for actions that get handled in bulk + if (action == "wear") + { + wear_multiple(ids, true); + } + else if (action == "wear_add") + { + wear_multiple(ids, false); + } + else if (action == "take_off" || action == "detach") + { + LLAppearanceMgr::instance().removeItemsFromAvatar(ids); + } + else + { + std::set<LLFolderViewItem*>::iterator set_iter; + for (set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter) + { + LLFolderViewItem* folder_item = *set_iter; + if(!folder_item) continue; + LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getViewModelItem(); + if(!bridge) continue; + bridge->performAction(model, action); + } + } // Update the marketplace listings that have been affected by the operation updateMarketplaceFolders(); |