EXT-7406 FIXED filtering out items of a link type (panel outfit edit, wearable bottom list)

Reviewed by Mike Antipov, Vadim Savchuk and Neal Orman

--HG--
branch : product-engine
meow-7.2.2
Igor Borovkov 2010-05-21 14:17:12 +03:00
parent 1d4b26832c
commit 6dc2f859fe
2 changed files with 8 additions and 10 deletions

View File

@ -37,23 +37,21 @@
#include "llinventoryitemslist.h"
#include "llinventorymodel.h"
class LLFindItemsByMask : public LLInventoryCollectFunctor
class LLFindNonLinksByMask : public LLInventoryCollectFunctor
{
public:
LLFindItemsByMask(U64 mask)
LLFindNonLinksByMask(U64 mask)
: mFilterMask(mask)
{}
virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item)
{
if(item)
if(item && !item->getIsLinkType() && (mFilterMask & (1LL << item->getInventoryType())) )
{
if( mFilterMask & (1LL << item->getInventoryType()) )
{
return TRUE;
}
return true;
}
return FALSE;
return false;
}
private:
@ -96,7 +94,7 @@ void LLFilteredWearableListManager::populateList()
{
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
LLFindItemsByMask collector(mFilterMask);
LLFindNonLinksByMask collector(mFilterMask);
gInventory.collectDescendentsIf(
gInventory.getRootFolderID(),

View File

@ -36,7 +36,7 @@
class LLInventoryItemsList;
// Class that fills LLInventoryItemsList with filtered data.
// Class that fills LLInventoryItemsList with filtered data (original items only (non-links)).
class LLFilteredWearableListManager : public LLInventoryObserver
{
LOG_CLASS(LLFilteredWearableListManager);