From 2e9671a8a8ec0a8897945c96aa62c77ad245abac Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Mon, 26 Jul 2010 10:33:43 +0300 Subject: 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 --- indra/newview/lloutfitslist.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'indra/newview/lloutfitslist.cpp') diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 146684288b..c3eee1d1ad 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -1005,17 +1005,7 @@ bool LLOutfitsList::canWearSelected() { const LLUUID& id = *it; - // Find links to the current item in COF. - // *TODO: share this? - LLInventoryModel::cat_array_t cats; - LLInventoryModel::item_array_t items; - LLLinkedItemIDMatches find_links(gInventory.getLinkedItemID(id)); - gInventory.collectDescendentsIf(LLAppearanceMgr::instance().getCOF(), - cats, - items, - LLInventoryModel::EXCLUDE_TRASH, - find_links); - if (!items.empty()) + if (LLAppearanceMgr::isLinkInCOF(id)) { return false; } -- cgit v1.2.3