diff options
| author | Rick Pasetto <rick@lindenlab.com> | 2009-11-19 09:29:08 -0800 |
|---|---|---|
| committer | Rick Pasetto <rick@lindenlab.com> | 2009-11-19 09:29:08 -0800 |
| commit | 0627d550f371c26b00e802bae288a5e6def53345 (patch) | |
| tree | 8f4e740736d4fbca2eb543bb0148232e968286ef /indra/newview/llinventoryfilter.cpp | |
| parent | 9e53ad6111ce0e15cb10f2ffb47fee8b48d1c3db (diff) | |
| parent | 51e640e5d753ac9dc005cd6827db77988a04b8fa (diff) | |
Automated merge with ssh://rick@hg.lindenlab.com/rick/viewer-2-0-rickcallum/
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 |
