diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2009-11-18 14:40:22 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2009-11-18 14:40:22 +0200 |
commit | 9fdae4414f7307f4599d395cfed912cec1d825bd (patch) | |
tree | 22a4996dd57fb98306e8b3c250372db9b49bbbcd /indra/newview/llinventoryfilter.cpp | |
parent | 215b95eb64ebea58d6f2bda5f90e307836aca093 (diff) | |
parent | 125b779fb63cafe4e5df4d601542def1b4bc05f3 (diff) |
Merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llinventoryfilter.cpp')
-rw-r--r-- | indra/newview/llinventoryfilter.cpp | 17 |
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 |