summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfilter.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2009-11-18 10:43:30 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2009-11-18 10:43:30 +0000
commit22aa5eed910bbd1b366789cb96247899c744df75 (patch)
tree40bf09c7239e6983b3eb279695b9f662ce4d4d0e /indra/newview/llinventoryfilter.cpp
parent939e48d38cf9f15e1f7220cc3860810badd8a778 (diff)
parent125b779fb63cafe4e5df4d601542def1b4bc05f3 (diff)
merge.
Diffstat (limited to 'indra/newview/llinventoryfilter.cpp')
-rw-r--r--indra/newview/llinventoryfilter.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 7ec8d3d003..085c96c93d 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -100,13 +100,18 @@ BOOL LLInventoryFilter::check(LLFolderViewItem* item)
bool passed_type = false;
if (mFilterOps.mFilterForCategories)
{
- if (listener->getInventoryType() == LLInventoryType::IT_CATEGORY)
+ // Pass if this item is a category of the filter type, or
+ // if its parent is a category of the filter type.
+ LLUUID uuid = listener->getUUID();
+ if (listener->getInventoryType() != LLInventoryType::IT_CATEGORY)
{
- LLViewerInventoryCategory *cat = gInventory.getCategory(listener->getUUID());
- if (cat)
- {
- passed_type |= ((1LL << cat->getPreferredType() & mFilterOps.mFilterTypes) != U64(0));
- }
+ const LLInventoryObject *obj = gInventory.getObject(uuid);
+ uuid = obj->getParentUUID();
+ }
+ LLViewerInventoryCategory *cat = gInventory.getCategory(uuid);
+ if (cat)
+ {
+ passed_type |= ((1LL << cat->getPreferredType() & mFilterOps.mFilterTypes) != U64(0));
}
}
else