diff options
| author | simon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com> | 2012-08-01 14:07:24 -0700 |
|---|---|---|
| committer | simon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com> | 2012-08-01 14:07:24 -0700 |
| commit | b7555a3309bda8e9689627901051aa90fcb7be34 (patch) | |
| tree | bbb84478c302539f434bab7a620fe23456926236 /indra/newview/lltooldraganddrop.cpp | |
| parent | 62379fd7628afa5ce1b104ff66b26821ce740c29 (diff) | |
| parent | 92a0db2a4f5397067e087068f736181e618e9c0a (diff) | |
Merge back viewer-lion, which has viewer-development and down-stream fixes
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 |
