diff options
| -rw-r--r-- | indra/newview/llinventoryfunctions.h | 17 | ||||
| -rw-r--r-- | indra/newview/llpaneloutfitedit.cpp | 6 | 
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))); | 
