summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-08-12 16:13:48 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-08-12 16:13:48 +0300
commitacab27b04e8fd649476d28abda4de2c2e390d274 (patch)
tree64b3f1b56c6cc1dce40de853cd8cfbc2e0ff711c /indra/newview
parent845317cb360cf095a37d2da11c4f26759b330c60 (diff)
EXT-8629 FIXED Enable the Wear button in My Outfits for outfits that are subsets of the current outfit.
We allowed wearing any outfit that contains non-worn items. Now it appears to be wrong, therefore and I changed condition so that we allow wearing any outfit (or folder) that contains the full set of body parts. Reviewed by Sergey Litovchuk at https://codereview.productengine.com/secondlife/r/855/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappearancemgr.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index cecb2ee6ad..6fdd71bfbf 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1012,7 +1012,7 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up
addCOFItemLink(item_to_wear, do_update, cb);
break;
case LLAssetType::AT_OBJECT:
- rez_attachment(item_to_wear, NULL, replace);
+ rez_attachment(item_to_wear, NULL);
break;
default: return false;;
}
@@ -1305,16 +1305,8 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
return false;
}
- // Check whether the outfit contains any non-worn wearables.
- LLInventoryModel::cat_array_t cats;
- LLInventoryModel::item_array_t items;
- LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ true);
- gInventory.collectDescendentsIf(outfit_cat_id,
- cats,
- items,
- LLInventoryModel::EXCLUDE_TRASH,
- not_worn);
- return items.size() > 0;
+ // Check whether the outfit contains the full set of body parts (shape+skin+hair+eyes).
+ return getCanMakeFolderIntoOutfit(outfit_cat_id);
}
void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category)
@@ -1836,9 +1828,9 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool
llinfos << "wearInventoryCategory( " << category->getName()
<< " )" << llendl;
- callAfterCategoryFetch(category->getUUID(),boost::bind(&LLAppearanceMgr::wearCategoryFinal,
- &LLAppearanceMgr::instance(),
- category->getUUID(), copy, append));
+ callAfterCategoryFetch(category->getUUID(), boost::bind(&LLAppearanceMgr::wearCategoryFinal,
+ &LLAppearanceMgr::instance(),
+ category->getUUID(), copy, append));
}
void LLAppearanceMgr::wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool append)