From bff974cdb896adfe6773433ada50a451ecf96e76 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Mon, 7 Jun 2010 12:10:36 +0300 Subject: EXT-7406 FIXED extended find wearables of type functor to filter out links (panel outfit edit) extended find wearables of type functor to filter out links Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/522 --HG-- branch : product-engine --- indra/newview/llinventoryfunctions.h | 13 +++++++++++++ indra/newview/llpaneloutfitedit.cpp | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 33b52cfd5e..c82ebd1439 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -324,6 +324,19 @@ private: LLWearableType::EType mWearableType; }; +/** Filter out wearables-links */ +class LLFindActualWearablesOfType : public LLFindWearablesOfType +{ +public: + LLFindActualWearablesOfType(LLWearableType::EType type) : LLFindWearablesOfType(type) {} + virtual ~LLFindActualWearablesOfType() {} + virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) + { + if (item && item->getIsLinkType()) return false; + return LLFindWearablesOfType::operator()(cat, item); + } +}; + // Find worn items. class LLFindWorn : public LLInventoryCollectFunctor { diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index ea7410502d..ce382541c6 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -280,7 +280,7 @@ BOOL LLPanelOutfitEdit::postBuild() childSetAction(REVERT_BTN, boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance())); mWearableListMaskCollector = new LLFindNonLinksByMask(ALL_ITEMS_MASK); - mWearableListTypeCollector = new LLFindWearablesOfType(LLWearableType::WT_NONE); + mWearableListTypeCollector = new LLFindActualWearablesOfType(LLWearableType::WT_NONE); mWearableItemsPanel = getChild("filtered_wearables_panel"); mWearableItemsList = getChild("filtered_wearables_list"); -- cgit v1.2.3