summaryrefslogtreecommitdiff
path: root/indra/newview/lltooldraganddrop.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-07-27 12:53:54 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-07-27 12:53:54 -0700
commit3e038cd71b3f3bc74d206267e451773fb963d258 (patch)
tree63cdafa4fdcce40bf64ed65ddbf18519bf6b566b /indra/newview/lltooldraganddrop.cpp
parentf82d0b171964a0b24ab0eca64febc0c1e3821138 (diff)
parent364566924188c7aed5d391bf9a226fc4779ba020 (diff)
Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-release.
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rw-r--r--indra/newview/lltooldraganddrop.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 86708b46d5..2680e4451b 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -1039,7 +1039,14 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj,
}
}
// Add the texture item to the target object's inventory.
- hit_obj->updateInventory(new_item, TASK_INVENTORY_ITEM_KEY, true);
+ if (LLAssetType::AT_TEXTURE == new_item->getType())
+ {
+ hit_obj->updateTextureInventory(new_item, TASK_INVENTORY_ITEM_KEY, true);
+ }
+ else
+ {
+ 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.
}
@@ -1054,7 +1061,14 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj,
// *FIX: may want to make sure agent can paint hit_obj.
// Add the texture item to the target object's inventory.
- hit_obj->updateInventory(new_item, TASK_INVENTORY_ITEM_KEY, true);
+ if (LLAssetType::AT_TEXTURE == new_item->getType())
+ {
+ hit_obj->updateTextureInventory(new_item, TASK_INVENTORY_ITEM_KEY, true);
+ }
+ else
+ {
+ hit_obj->updateInventory(new_item, TASK_INVENTORY_ITEM_KEY, true);
+ }
// Force the object to update its refetch its inventory so it has this texture.
hit_obj->fetchInventoryFromServer();
// TODO: Check to see if adding the item was successful; if not, then