From 4110307f28b0210311179b15bc4e85de3bdfbce0 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 16 Nov 2009 17:49:11 -0500 Subject: EXT-2527 : Allow contents of Appearance panel to be expandable Changed the InventoryFilter logic slightly, so that if it's filtering by categories, it allows the contents of those categories to pass. --HG-- branch : avatar-pipeline --- indra/newview/llinventoryfilter.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llinventoryfilter.cpp') diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 7ec8d3d003..3e4b3327db 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -108,6 +108,10 @@ BOOL LLInventoryFilter::check(LLFolderViewItem* item) passed_type |= ((1LL << cat->getPreferredType() & mFilterOps.mFilterTypes) != U64(0)); } } + else + { + passed_type = TRUE; + } } else { -- cgit v1.2.3 From 32dccaf3d89b40b711d69088a3e390119c7efc7f Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 17 Nov 2009 10:36:11 -0500 Subject: Sidepanel Appearance refactoring. Work in progress. 1. Changed sidepanel names to have "sidepanel" (e.g. panel_appearance -> sidepanel_appearance) 2. Changed some "Looks" names to "Outfits" 3. Changed LLPanelLooks to LLPanelOutfitsInventory (to match other inventory panel naming) 4. Took out tab from sidepanel_appearance. --HG-- branch : avatar-pipeline --- indra/newview/llinventoryfilter.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'indra/newview/llinventoryfilter.cpp') diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 3e4b3327db..085c96c93d 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -100,17 +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(); } - else + LLViewerInventoryCategory *cat = gInventory.getCategory(uuid); + if (cat) { - passed_type = TRUE; + passed_type |= ((1LL << cat->getPreferredType() & mFilterOps.mFilterTypes) != U64(0)); } } else -- cgit v1.2.3