summaryrefslogtreecommitdiff
path: root/indra/newview/lltooldraganddrop.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2007-12-05 23:43:56 +0000
committerDon Kjer <don@lindenlab.com>2007-12-05 23:43:56 +0000
commitfacf67ae3226105910c983a8fa8760414bf703e9 (patch)
treeb5f7cd6b79a79f769080a65b6fe2cb6b97c8b6fb /indra/newview/lltooldraganddrop.cpp
parent45057e8881c3166c7c0ef545c02bc177922af6fb (diff)
EFFECTIVE MERGE: svn merge -r 71520:73420 svn+ssh://svn/svn/linden/branches/maintenance-3 into release
ACTUAL MERGE: svn merge -r 75074:75114 svn+ssh://svn/svn/linden/qa/maintenance-3-merge-75067 into release
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rw-r--r--indra/newview/lltooldraganddrop.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index e6eca31cd0..413b26309d 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -1204,6 +1204,7 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj,
// if the asset is already in the object's inventory
// then it can always be added to a side.
// This saves some work if the task's inventory is already loaded
+ // and ensures that the texture item is only added once.
return TRUE;
}
@@ -1241,7 +1242,10 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj,
return FALSE;
}
}
- hit_obj->updateInventory(new_item, TASK_INVENTORY_ASSET_KEY, true);
+ // Add the texture item to the target object's inventory.
+ hit_obj->updateInventory(new_item, TASK_INVENTORY_ITEM_KEY, true);
+ // TODO: Check to see if adding the item was successful; if not, then
+ // we should return false here.
}
else if(!item->getPermissions().allowOperationBy(PERM_TRANSFER,
gAgent.getID()))
@@ -1253,8 +1257,10 @@ 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.
- hit_obj->updateInventory(new_item, TASK_INVENTORY_ASSET_KEY, true);
+ // Add the texture item to the target object's inventory.
+ hit_obj->updateInventory(new_item, TASK_INVENTORY_ITEM_KEY, true);
+ // TODO: Check to see if adding the item was successful; if not, then
+ // we should return false here.
}
return TRUE;
}