diff options
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
| -rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 7040fef65e..6c5325620e 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -588,7 +588,6 @@ void move_to_outbox_cb(const LLSD& notification, const LLSD& response) parent = next_parent; } } - } } @@ -620,8 +619,7 @@ void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LL gInventory.notifyObservers(); } - copy_inventory_item( - gAgent.getID(), + copy_inventory_item(gAgent.getID(), inv_item->getPermissions().getOwner(), inv_item->getUUID(), dest_folder, @@ -641,6 +639,23 @@ void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LL } } +void move_item_within_outbox(LLInventoryItem* inv_item, LLUUID dest_folder) +{ + // when moving item directly into outbox create folder with that name + if (dest_folder == gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false)) + { + dest_folder = gInventory.createNewCategory(dest_folder, LLFolderType::FT_NONE, inv_item->getName()); + gInventory.notifyObservers(); + } + + LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *) inv_item; + + change_item_parent(&gInventory, + viewer_inv_item, + dest_folder, + false); +} + void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_folder, const LLUUID& top_level_folder) { LLUUID new_folder_id = gInventory.createNewCategory(dest_folder, LLFolderType::FT_NONE, inv_cat->getName()); |
