summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index c928cf0601..12159738d8 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1321,6 +1321,8 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items)
//=========================================================================
+const std::string LLAppearanceMgr::sExpectedTextureName = "OutfitPreview";
+
const LLUUID LLAppearanceMgr::getCOF() const
{
return gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
@@ -1570,6 +1572,7 @@ void LLAppearanceMgr::removeOutfitPhoto(const LLUUID& outfit_id)
LLInventoryModel::EXCLUDE_TRASH);
BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array)
{
+ // Note: removing only links
LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem();
if (linked_item != NULL && linked_item->getActualType() == LLAssetType::AT_TEXTURE)
{
@@ -3218,9 +3221,26 @@ void update_base_outfit_after_ordering()
BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array)
{
LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem();
- if (linked_item != NULL && linked_item->getActualType() == LLAssetType::AT_TEXTURE)
+ if (linked_item != NULL)
+ {
+ if (linked_item->getActualType() == LLAssetType::AT_TEXTURE)
+ {
+ app_mgr.setOutfitImage(linked_item->getLinkedUUID());
+ if (linked_item->getName() == LLAppearanceMgr::sExpectedTextureName)
+ {
+ // Images with "appropriate" name take priority
+ break;
+ }
+ }
+ }
+ else if (outfit_item->getActualType() == LLAssetType::AT_TEXTURE)
{
- app_mgr.setOutfitImage(linked_item->getLinkedUUID());
+ app_mgr.setOutfitImage(outfit_item->getUUID());
+ if (outfit_item->getName() == LLAppearanceMgr::sExpectedTextureName)
+ {
+ // Images with "appropriate" name take priority
+ break;
+ }
}
}