summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-12-13 13:56:41 -0800
committerLeslie Linden <leslie@lindenlab.com>2011-12-13 13:56:41 -0800
commitd7fabfee19e536dd8df356fd4531437ccb3630d5 (patch)
treeb5f66f4d24224ad4c85e8d259160d7c95dd2c833 /indra/newview/llinventoryfunctions.cpp
parenta96271e3c2958a95040a1348934bd3f056f374ab (diff)
EXP-1715 FIX -- Merchant outbox drag and drop has offset between mouse position and selected folder
EXP-1717 FIX -- Drag and drop within the outbox can result in an item created at the top level of the outbox Folders are now created for items dragged around within the merchant outbox if their drop target is the top level outbox inventory panel itself.
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp21
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());