summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorIgor Borovkov <iborovkov@productengine.com>2010-06-07 12:10:36 +0300
committerIgor Borovkov <iborovkov@productengine.com>2010-06-07 12:10:36 +0300
commitbff974cdb896adfe6773433ada50a451ecf96e76 (patch)
tree00ef1d2695ebcdc8e1220711f6ccebe2a644550c /indra
parentd1751df1cc5d9bf853f29555de94faec1912e19f (diff)
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
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventoryfunctions.h13
-rw-r--r--indra/newview/llpaneloutfitedit.cpp2
2 files changed, 14 insertions, 1 deletions
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<LLPanel>("filtered_wearables_panel");
mWearableItemsList = getChild<LLInventoryItemsList>("filtered_wearables_list");