summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2015-04-14 15:46:49 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2015-04-14 15:46:49 -0400
commitc6af736035513581c36a65da3a0adec1546c8264 (patch)
tree2847e84c121fc415283fb39442bf3ba2d64cbdf4
parent32940ee90b6dae898f83cf99516f18f106246ace (diff)
MAINT-5082 WIP, MAINT-5083 WIP - batch up wear/add/take off/detach requests in inventory panel the same way we do now in appearance tab
-rwxr-xr-xindra/newview/llinventoryfunctions.cpp40
1 files changed, 30 insertions, 10 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 1abc09bf3b..2546db546b 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)