summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorygallery.cpp
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-06-23 12:48:57 +0300
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-06-23 12:48:57 +0300
commitc24849f9da07f72a1dab83ccc69ec61c3448d027 (patch)
tree87f9d2822c6695a553f45321e64abcdf8464ce32 /indra/newview/llinventorygallery.cpp
parent7e0dceca68e4b9d9d94b9e530954cba9366dc97e (diff)
SL-19912 allow drag-n-drop items from Object's content to the Gallery
Diffstat (limited to 'indra/newview/llinventorygallery.cpp')
-rw-r--r--indra/newview/llinventorygallery.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index d76f0a45b2..0cff30f1aa 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -2714,6 +2714,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
// coming from a task. Need to figure out if the person can
// move/copy this item.
LLPermissions perm(inv_item->getPermissions());
+ bool is_move = false;
if ((perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID())
&& perm.allowTransferTo(gAgent.getID())))
// || gAgent.isGodlike())
@@ -2725,6 +2726,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
// If the object cannot be copied, but the object the
// inventory is owned by the agent, then the item can be
// moved from the task to agent inventory.
+ is_move = true;
accept = TRUE;
}
@@ -2749,9 +2751,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
if (accept && drop)
{
- //todo: dnd from SOURCE_WORLD
-
- /*boost::shared_ptr<LLMoveInv> move_inv (new LLMoveInv());
+ boost::shared_ptr<LLMoveInv> move_inv (new LLMoveInv());
move_inv->mObjectID = inv_item->getParentUUID();
std::pair<LLUUID, LLUUID> item_pair(folder_id, inv_item->getUUID());
move_inv->mMoveList.push_back(item_pair);
@@ -2769,7 +2769,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
LLNotification::Params params("MoveInventoryFromObject");
params.functor.function(boost::bind(move_task_inventory_callback, _1, _2, move_inv));
LLNotifications::instance().forceResponse(params, 0);
- }*/
+ }
}
}
else if(LLToolDragAndDrop::SOURCE_NOTECARD == source)
@@ -3185,9 +3185,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
}
else
{
- //todo: dnd from SOURCE_WORLD
- accept = FALSE;
- //accept = move_inv_category_world_to_agent(cat_id, mUUID, drop, NULL, NULL, filter);
+ accept = move_inv_category_world_to_agent(cat_id, dest_id, drop);
}
}
else if (LLToolDragAndDrop::SOURCE_LIBRARY == source)