summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorIgor Borovkov <iborovkov@productengine.com>2010-07-09 19:08:46 +0300
committerIgor Borovkov <iborovkov@productengine.com>2010-07-09 19:08:46 +0300
commit96631f6d4ef15f77775ef643091b4d62579dca3e (patch)
treeda13aa4647fea3a5fc586c6b7fb8d1969038b07c /indra/newview
parenteaf114fdfd7967178c168c907ca24f2faa97a7cf (diff)
EXT-7406 FIXED excluded inventory links from Add More list view (panel outfit edit)
Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/723 --HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llinventoryfunctions.h17
-rw-r--r--indra/newview/llpaneloutfitedit.cpp6
2 files changed, 17 insertions, 6 deletions
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 1c3f82c531..a6d7fcd956 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -271,9 +271,7 @@ public:
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLFindNonLinksByMask
-//
-//
+// Class LLFindByMask
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLFindByMask : public LLInventoryCollectFunctor
{
@@ -382,6 +380,19 @@ public:
}
};
+/* Filters out items of a particular asset type */
+class LLIsTypeActual : public LLIsType
+{
+public:
+ LLIsTypeActual(LLAssetType::EType type) : LLIsType(type) {}
+ virtual ~LLIsTypeActual() {}
+ virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item)
+ {
+ if (item && item->getIsLinkType()) return false;
+ return LLIsType::operator()(cat, item);
+ }
+};
+
// Collect non-removable folders and items.
class LLFindNonRemovableObjects : public LLInventoryCollectFunctor
{
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 827ecb1c92..31c427d2ba 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -297,9 +297,9 @@ BOOL LLPanelOutfitEdit::postBuild()
mFolderViewItemTypes[FVIT_ATTACHMENT] = LLLookItemType(getString("Filter.Objects"), ATTACHMENT_MASK);
//order is important, see EListViewItemType for order information
- mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.All"), new LLFindByMask(ALL_ITEMS_MASK)));
- mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Clothing"), new LLIsType(LLAssetType::AT_CLOTHING)));
- mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Bodyparts"), new LLIsType(LLAssetType::AT_BODYPART)));
+ mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.All"), new LLFindNonLinksByMask(ALL_ITEMS_MASK)));
+ mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Clothing"), new LLIsTypeActual(LLAssetType::AT_CLOTHING)));
+ mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Bodyparts"), new LLIsTypeActual(LLAssetType::AT_BODYPART)));
mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Objects"), new LLFindByMask(ATTACHMENT_MASK)));;
mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("shape"), new LLFindActualWearablesOfType(LLWearableType::WT_SHAPE)));
mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("skin"), new LLFindActualWearablesOfType(LLWearableType::WT_SKIN)));