Skip to content
Snippets Groups Projects
Commit baf86263 authored by andreykproductengine's avatar andreykproductengine
Browse files

SL-12213 Unable to paste no-modify/no-transfer texture

parent 448eff83
Branches
Tags
1 merge request!83Merge Linden 6.6.7
...@@ -2449,7 +2449,7 @@ bool LLPanelObject::canCopyTexture(LLUUID image_id) ...@@ -2449,7 +2449,7 @@ bool LLPanelObject::canCopyTexture(LLUUID image_id)
{ {
// User is allowed to copy a texture if: // User is allowed to copy a texture if:
// library asset or default texture, // library asset or default texture,
// or full perm asset exists in user's inventory // or copy perm asset exists in user's inventory
// Library asset or default texture // Library asset or default texture
if (gInventory.isObjectDescendentOf(image_id, gInventory.getLibraryRootFolderID()) if (gInventory.isObjectDescendentOf(image_id, gInventory.getLibraryRootFolderID())
...@@ -2461,7 +2461,7 @@ bool LLPanelObject::canCopyTexture(LLUUID image_id) ...@@ -2461,7 +2461,7 @@ bool LLPanelObject::canCopyTexture(LLUUID image_id)
return true; return true;
} }
// Search for a full perm asset // Search for a copy perm asset
LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryCategory::cat_array_t cats;
LLViewerInventoryItem::item_array_t items; LLViewerInventoryItem::item_array_t items;
LLAssetIDMatches asset_id_matches(image_id); LLAssetIDMatches asset_id_matches(image_id);
...@@ -2475,12 +2475,18 @@ bool LLPanelObject::canCopyTexture(LLUUID image_id) ...@@ -2475,12 +2475,18 @@ bool LLPanelObject::canCopyTexture(LLUUID image_id)
for (S32 i = 0; i < items.size(); i++) for (S32 i = 0; i < items.size(); i++)
{ {
LLViewerInventoryItem* itemp = items[i]; LLViewerInventoryItem* itemp = items[i];
if (itemp->getIsFullPerm()) if (itemp)
{
LLPermissions item_permissions = itemp->getPermissions();
if (item_permissions.allowOperationBy(PERM_COPY,
gAgent.getID(),
gAgent.getGroupID()))
{ {
return true; return true;
} }
} }
} }
}
return false; return false;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment