diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-10-16 21:41:31 +0000 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-10-16 21:41:31 +0000 |
commit | 89d92267e233bc34fe600a07f485266e7edb2879 (patch) | |
tree | 6b70df4f746b15024f3956c0dc9cb5fa5233f606 /indra/newview/llfloaterinventory.cpp | |
parent | fbddb3163824d44cfb2ceee7127ac9ed2874acab (diff) |
svn merge -r134817:136516 svn+ssh://svn.lindenlab.com/svn/linden/branches/avatar-pipeline/avatar-pipeline-multiattachments-3 into svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-2.0.0-3
For DEV-32867 : Avatar Pipeline Project - Multi-Attachments
This is a viewer-side-only, infrastructure-only merge for multi-attachments. This should not lead to any new functionality; it simply provides backwards compatibility for when multi-attachments are enabled in viewer2.1, so that viewer2.0 users can see viewer2.1 avatars correctly.
Reviewed by: Vir.
Diffstat (limited to 'indra/newview/llfloaterinventory.cpp')
-rw-r--r-- | indra/newview/llfloaterinventory.cpp | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp index 126dcc6f76..a8ab4303ba 100644 --- a/indra/newview/llfloaterinventory.cpp +++ b/indra/newview/llfloaterinventory.cpp @@ -1837,7 +1837,6 @@ bool LLInventoryPanel::attachObject(const LLSD& userdata) { std::set<LLUUID> selected_items; mFolders->getSelectionList(selected_items); - LLUUID id = *selected_items.begin(); std::string joint_name = userdata.asString(); LLVOAvatar *avatarp = static_cast<LLVOAvatar*>(gAgent.getAvatarObject()); @@ -1857,22 +1856,28 @@ bool LLInventoryPanel::attachObject(const LLSD& userdata) { return true; } - LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(id); - if(item && gInventory.isObjectDescendentOf(id, gInventory.getRootFolderID())) + for (std::set<LLUUID>::const_iterator set_iter = selected_items.begin(); + set_iter != selected_items.end(); + ++set_iter) { - rez_attachment(item, attachmentp); - } - else if(item && item->isComplete()) - { - // must be in library. copy it to our inventory and put it on. - LLPointer<LLInventoryCallback> cb = new RezAttachmentCallback(attachmentp); - copy_inventory_item(gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - LLUUID::null, - std::string(), - cb); + const LLUUID &id = *set_iter; + LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(id); + if(item && gInventory.isObjectDescendentOf(id, gInventory.getRootFolderID())) + { + rez_attachment(item, attachmentp); + } + else if(item && item->isComplete()) + { + // must be in library. copy it to our inventory and put it on. + LLPointer<LLInventoryCallback> cb = new RezAttachmentCallback(attachmentp); + copy_inventory_item(gAgent.getID(), + item->getPermissions().getOwner(), + item->getUUID(), + LLUUID::null, + std::string(), + cb); + } } gFocusMgr.setKeyboardFocus(NULL); |