summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventoryfilter.cpp')
-rwxr-xr-xindra/newview/llinventoryfilter.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 000eee3317..370392b2f2 100755
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -177,6 +177,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
// Pass if this item's type is of the correct filter type
if (filterTypes & FILTERTYPE_OBJECT)
{
+
// If it has no type, pass it, unless it's a link.
if (object_type == LLInventoryType::IT_NONE)
{
@@ -244,13 +245,25 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
bool is_hidden_if_empty = LLViewerFolderType::lookupIsHiddenIfEmpty(listener->getPreferredType());
if (is_hidden_if_empty)
{
- // Force the fetching of those folders so they are hidden iff they really are empty...
+ // Force the fetching of those folders so they are hidden if they really are empty...
gInventory.fetchDescendentsOf(object_id);
- return FALSE;
+
+ LLInventoryModel::cat_array_t* cat_array = NULL;
+ LLInventoryModel::item_array_t* item_array = NULL;
+ gInventory.getDirectDescendentsOf(object_id,cat_array,item_array);
+ S32 descendents_actual = 0;
+ if(cat_array && item_array)
+ {
+ descendents_actual = cat_array->size() + item_array->size();
+ }
+ if (descendents_actual == 0)
+ {
+ return FALSE;
+ }
}
}
}
-
+
return TRUE;
}
@@ -972,6 +985,11 @@ void LLInventoryFilter::fromParams(const Params& params)
setDateRangeLastLogoff(params.since_logoff);
}
+U64 LLInventoryFilter::getFilterTypes() const
+{
+ return mFilterOps.mFilterTypes;
+}
+
U64 LLInventoryFilter::getFilterObjectTypes() const
{
return mFilterOps.mFilterObjectTypes;