diff options
Diffstat (limited to 'indra/newview/llinventoryfilter.cpp')
-rw-r--r-- | indra/newview/llinventoryfilter.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index f64c39c3ad..f33df43919 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -53,6 +53,7 @@ LLInventoryFilter::FilterOps::FilterOps(const Params& p) : mFilterObjectTypes(p.object_types), mFilterCategoryTypes(p.category_types), mFilterWearableTypes(p.wearable_types), + mFilterSettingsTypes(p.settings_types), mMinDate(p.date_range.min_date), mMaxDate(p.date_range.max_date), mHoursAgo(p.hours_ago), @@ -325,12 +326,26 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent if (filterTypes & FILTERTYPE_WEARABLE) { LLWearableType::EType type = listener->getWearableType(); - if ((0x1LL << type & mFilterOps.mFilterWearableTypes) == 0) + if ((object_type == LLInventoryType::IT_WEARABLE) && + (((0x1LL << type) & mFilterOps.mFilterWearableTypes) == 0)) { return FALSE; } } + //////////////////////////////////////////////////////////////////////////////// + // FILTERTYPE_SETTINGS + // Pass if this item is a setting of the appropriate type + if (filterTypes & FILTERTYPE_SETTINGS) + { + LLSettingsType::type_e type = listener->getSettingsType(); + if ((object_type == LLInventoryType::IT_SETTINGS) && + (((0x1LL << type) & mFilterOps.mFilterSettingsTypes) == 0)) + { + return FALSE; + } + } + //////////////////////////////////////////////////////////////////////////////// // FILTERTYPE_EMPTYFOLDERS // Pass if this item is a folder and is not a system folder that should be hidden @@ -626,6 +641,12 @@ void LLInventoryFilter::setFilterWearableTypes(U64 types) mFilterOps.mFilterTypes |= FILTERTYPE_WEARABLE; } +void LLInventoryFilter::setFilterSettingsTypes(U64 types) +{ + updateFilterTypes(types, mFilterOps.mFilterSettingsTypes); + mFilterOps.mFilterTypes |= FILTERTYPE_SETTINGS; +} + void LLInventoryFilter::setFilterEmptySystemFolders() { mFilterOps.mFilterTypes |= FILTERTYPE_EMPTYFOLDERS; @@ -1241,6 +1262,11 @@ U64 LLInventoryFilter::getFilterWearableTypes() const return mFilterOps.mFilterWearableTypes; } +U64 LLInventoryFilter::getFilterSettingsTypes() const +{ + return mFilterOps.mFilterSettingsTypes; +} + bool LLInventoryFilter::hasFilterString() const { return mFilterSubString.size() > 0; |