diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-07-23 19:21:34 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-07-23 19:21:34 -0700 |
commit | 4feef5af63f6294249aa50e37fba712cd9ddec91 (patch) | |
tree | d288ba7c65611f95762c20b6a7c244d7348bcec8 /indra/newview/lltooldraganddrop.cpp | |
parent | e7e0e514fdc3b522787e18fddee89b9f9fbbe834 (diff) | |
parent | 364566924188c7aed5d391bf9a226fc4779ba020 (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.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 4f4eef0f3d..c69999981c 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1007,7 +1007,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. } @@ -1022,7 +1029,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 |