diff options
author | simon <none@none> | 2015-06-08 14:54:22 -0700 |
---|---|---|
committer | simon <none@none> | 2015-06-08 14:54:22 -0700 |
commit | 316bdc0ab04f8cfb587bbfbe0966963f7614cce2 (patch) | |
tree | 0f8e8ef231c7df1d2825adf9929c6b6f9a84f880 /indra/newview/llinventoryfunctions.cpp | |
parent | 4647dc6fe7aacccf089d214bf26b47f417bd7ae6 (diff) | |
parent | f3c58f765c0168f25bb13c4427e34b4bdad2f671 (diff) |
Merge viewer-release and become version 3.7.30
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 a19eed73db..4075c329b9 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" @@ -1114,16 +1115,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); + } + } LLFloater::setFloaterHost(NULL); if (multi_previewp) |