summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturectrl.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2016-11-25 16:12:31 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2016-11-25 16:12:31 +0200
commit334d853527cc8114c74808a2506088f0af6abdd6 (patch)
tree80836d339671f7a21a2af7673277851cd73c9b05 /indra/newview/lltexturectrl.cpp
parent76b3efe01cdf96879c3e7880ee78cccafd36e917 (diff)
MAINT-6961 FIXED Some textures(copied from Library) couldn't be set as Outfit image via "Select image" although drag and drop works fine
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rw-r--r--indra/newview/lltexturectrl.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index c159830c22..c7adaa908f 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -564,7 +564,7 @@ void LLFloaterTexturePicker::draw()
}
}
-const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL copyable_only)
+const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL copyable_only, BOOL ignore_library)
{
LLViewerInventoryCategory::cat_array_t cats;
LLViewerInventoryItem::item_array_t items;
@@ -584,7 +584,10 @@ const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL co
LLPermissions item_permissions = itemp->getPermissions();
if (item_permissions.allowCopyBy(gAgent.getID(), gAgent.getGroupID()))
{
- return itemp->getUUID();
+ if(!ignore_library || !gInventory.isObjectDescendentOf(itemp->getUUID(),gInventory.getLibraryRootFolderID()))
+ {
+ return itemp->getUUID();
+ }
}
}
// otherwise just return first instance, unless copyable requested
@@ -594,7 +597,10 @@ const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL co
}
else
{
- return items[0]->getUUID();
+ if(!ignore_library || !gInventory.isObjectDescendentOf(items[0]->getUUID(),gInventory.getLibraryRootFolderID()))
+ {
+ return items[0]->getUUID();
+ }
}
}