summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-11-04 11:26:50 -0700
committerLeslie Linden <leslie@lindenlab.com>2011-11-04 11:26:50 -0700
commit94678c2f7fbab0676ebf5c664e2d4cb8643b535f (patch)
tree5d832cf28fcb4fb5ee4bb23e6e4845644da8b0c4 /indra/newview/llviewerinventory.cpp
parent5d2d22322527bf303d24c15fde15025c045b7654 (diff)
EXP-1541 update -- Route inventory items sent in a Notecard to correct locations rather than auto-sorting by asset type
* New code specifies explicit destination for "copy from notecard" or null, indicating the sim should determine the placement. Reviewed by Stone.
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 519d4fe7f8..163581ea7f 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1209,7 +1209,23 @@ void move_inventory_item(
gAgent.sendReliableMessage();
}
-void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecard_inv_id, const LLInventoryItem *src, U32 callback_id)
+const LLUUID get_folder_by_itemtype(const LLInventoryItem *src)
+{
+ LLUUID retval = LLUUID::null;
+
+ if (src)
+ {
+ retval = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(src->getType()));
+ }
+
+ return retval;
+}
+
+void copy_inventory_from_notecard(const LLUUID& destination_id,
+ const LLUUID& object_id,
+ const LLUUID& notecard_inv_id,
+ const LLInventoryItem *src,
+ U32 callback_id)
{
if (NULL == src)
{
@@ -1255,7 +1271,7 @@ void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecar
body["notecard-id"] = notecard_inv_id;
body["object-id"] = object_id;
body["item-id"] = src->getUUID();
- body["folder-id"] = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(src->getType()));
+ body["folder-id"] = destination_id;
body["callback-id"] = (LLSD::Integer)callback_id;
request["message"] = "CopyInventoryFromNotecard";