summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2010-07-26 10:33:43 +0300
committerAlexei Arabadji <aarabadji@productengine.com>2010-07-26 10:33:43 +0300
commit2e9671a8a8ec0a8897945c96aa62c77ad245abac (patch)
tree65ee260d4f48d8a1f3c189b221681c1bd99cb0cb /indra/newview/llappearancemgr.cpp
parent4eee391b491de42375092e8ed930872e7f195fbb (diff)
EXT-8329 FIXED Provided disabling 'Wear Item' button after item was worn.
Details: 1 Updated condition is item can be worn considering situation when item is copied in COF but is not worn. 2 Avoided code duplication in method LLOutfitsList::canWearSelected() reviewed by Vadim Savchuk and Neal Orman at https://codereview.productengine.com/secondlife/r/785/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 5e0d49ac12..ee0c77ef53 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2699,6 +2699,21 @@ BOOL LLAppearanceMgr::getIsInCOF(const LLUUID& obj_id) const
return gInventory.isObjectDescendentOf(obj_id, getCOF());
}
+// static
+bool LLAppearanceMgr::isLinkInCOF(const LLUUID& obj_id)
+{
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
+ LLLinkedItemIDMatches find_links(gInventory.getLinkedItemID(obj_id));
+ gInventory.collectDescendentsIf(LLAppearanceMgr::instance().getCOF(),
+ cats,
+ items,
+ LLInventoryModel::EXCLUDE_TRASH,
+ find_links);
+
+ return !items.empty();
+}
+
BOOL LLAppearanceMgr::getIsProtectedCOFItem(const LLUUID& obj_id) const
{
if (!getIsInCOF(obj_id)) return FALSE;