summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Borovkov <iborovkov@productengine.com>2010-05-21 14:17:12 +0300
committerIgor Borovkov <iborovkov@productengine.com>2010-05-21 14:17:12 +0300
commit6dc2f859fe60feffa92f1377cff8888ba0b47341 (patch)
treeaccd4237dab67f7d0fe88bf3c65c7fb68bc14e20
parent1d4b26832c735ee616abf6a17f3271492fe30b4f (diff)
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
-rw-r--r--indra/newview/llfilteredwearablelist.cpp16
-rw-r--r--indra/newview/llfilteredwearablelist.h2
2 files changed, 8 insertions, 10 deletions
diff --git a/indra/newview/llfilteredwearablelist.cpp b/indra/newview/llfilteredwearablelist.cpp
index 01d3c3f22e..fd99f673e0 100644
--- a/indra/newview/llfilteredwearablelist.cpp
+++ b/indra/newview/llfilteredwearablelist.cpp
@@ -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(),
diff --git a/indra/newview/llfilteredwearablelist.h b/indra/newview/llfilteredwearablelist.h
index 3f42833bb4..0780c02442 100644
--- a/indra/newview/llfilteredwearablelist.h
+++ b/indra/newview/llfilteredwearablelist.h
@@ -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);