diff options
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index cc912758e2..51ee5b6157 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -95,7 +95,7 @@ bool get_is_predefined_texture(LLUUID asset_id) return false; } -LLUUID get_copy_free_item_by_asset_id(LLUUID asset_id) +LLUUID get_copy_free_item_by_asset_id(LLUUID asset_id, bool no_trans_perm) { LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; @@ -105,6 +105,8 @@ LLUUID get_copy_free_item_by_asset_id(LLUUID asset_id) items, LLInventoryModel::INCLUDE_TRASH, asset_id_matches); + + LLUUID res; if (items.size()) { for (S32 i = 0; i < items.size(); i++) @@ -117,12 +119,17 @@ LLUUID get_copy_free_item_by_asset_id(LLUUID asset_id) gAgent.getID(), gAgent.getGroupID())) { - return itemp->getUUID(); + bool allow_trans = item_permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID(), gAgent.getGroupID()); + if (allow_trans != no_trans_perm) + { + return itemp->getUUID(); + } + res = itemp->getUUID(); } } } } - return LLUUID::null; + return res; } bool get_can_copy_texture(LLUUID asset_id) |