diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-11-25 16:12:31 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-11-25 16:12:31 +0200 |
commit | 334d853527cc8114c74808a2506088f0af6abdd6 (patch) | |
tree | 80836d339671f7a21a2af7673277851cd73c9b05 /indra/newview | |
parent | 76b3efe01cdf96879c3e7880ee78cccafd36e917 (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')
-rw-r--r-- | indra/newview/lloutfitgallery.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 12 | ||||
-rw-r--r-- | indra/newview/lltexturectrl.h | 2 |
3 files changed, 11 insertions, 5 deletions
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 8887a61857..eeeb7e5c25 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -1194,7 +1194,7 @@ void LLOutfitGallery::onTexturePickerCommit(LLTextureCtrl::ETexturePickOp op, LL } else { - image_item_id = floaterp->findItemID(floaterp->getAssetID(), FALSE); + image_item_id = floaterp->findItemID(floaterp->getAssetID(), FALSE, TRUE); if (image_item_id.isNull()) { LL_WARNS() << "id or image_item_id is NULL!" << LL_ENDL; 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(); + } } } diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 61f99de5c0..840feddfaf 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -278,7 +278,7 @@ public: void setImageID(const LLUUID& image_asset_id, bool set_selection = true); void updateImageStats(); const LLUUID& getAssetID() { return mImageAssetID; } - const LLUUID& findItemID(const LLUUID& asset_id, BOOL copyable_only); + const LLUUID& findItemID(const LLUUID& asset_id, BOOL copyable_only, BOOL ignore_library = FALSE); void setCanApplyImmediately(BOOL b); void setActive(BOOL active); |