summaryrefslogtreecommitdiff
path: root/indra/newview/lltooldraganddrop.cpp
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2007-02-20 22:02:36 +0000
committerJosh Bell <josh@lindenlab.com>2007-02-20 22:02:36 +0000
commit7dada07dbaae3dfb9b1319453e51019bfff2717f (patch)
treea7f2b84ea65c39cee31474640dd5f265c0b2f432 /indra/newview/lltooldraganddrop.cpp
parent73bc0fb42b5bcd80030d9f30d5cb57ec2397ba08 (diff)
svn merge -r 57620:58007 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rw-r--r--indra/newview/lltooldraganddrop.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 94b549b8e6..5d7b323660 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -1185,6 +1185,8 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj,
return TRUE;
}
+ if (!item) return FALSE;
+
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
if(!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()))
{
@@ -1217,6 +1219,7 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj,
return FALSE;
}
}
+std::cout << "ASSET ID: " << new_item->getAssetUUID() << "\n";
hit_obj->updateInventory(new_item, TASK_INVENTORY_ASSET_KEY, true);
}
else if(!item->getPermissions().allowOperationBy(PERM_TRANSFER,
@@ -1230,6 +1233,7 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj,
// *FIX: may want to make sure agent can paint hit_obj.
// make sure the object has the texture in it's inventory.
+std::cout << "ASSET ID: " << new_item->getAssetUUID() << "\n";
hit_obj->updateInventory(new_item, TASK_INVENTORY_ASSET_KEY, true);
}
return TRUE;
@@ -2305,6 +2309,12 @@ EAcceptance LLToolDragAndDrop::dad3dTextureObject(
{
return ACCEPT_NO_LOCKED;
}
+ //If texture !copyable don't texture or you'll never get it back.
+ if(!item->getPermissions().allowCopyBy(gAgent.getID()))
+ {
+ return ACCEPT_NO;
+ }
+
if(drop && (ACCEPT_YES_SINGLE <= rv))
{
if((mask & MASK_SHIFT))