diff options
-rw-r--r-- | indra/newview/llpersonmodelcommon.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llpersonmodelcommon.h | 8 |
2 files changed, 5 insertions, 12 deletions
diff --git a/indra/newview/llpersonmodelcommon.cpp b/indra/newview/llpersonmodelcommon.cpp index 9660432b80..6b4c71faa2 100644 --- a/indra/newview/llpersonmodelcommon.cpp +++ b/indra/newview/llpersonmodelcommon.cpp @@ -96,8 +96,8 @@ void LLPersonModelCommon::showProperties(void) bool LLPersonModelCommon::filter( LLFolderViewFilter& filter) { - // See LLFolderViewModelItemInventory::filter() /* + Hack: for the moment, we always apply the filter if we're called if (!filter.isModified()) { llinfos << "Merov : LLPersonModelCommon::filter, exit, no modif" << llendl; @@ -106,19 +106,20 @@ bool LLPersonModelCommon::filter( LLFolderViewFilter& filter) */ if (!mChildren.empty()) { - //llinfos << "Merov : LLPersonModelCommon::filter, filtering folder = " << getDisplayName() << llendl; - setPassedFilter(1, -1, filter.getStringMatchOffset(this), filter.getFilterStringSize()); + // If the current instance has children, it's a "person folder" and always passes filters (we do not filter out empty folders) + setPassedFilter(1, -1); + // Call filter recursively on all children for (child_list_t::iterator iter = mChildren.begin(), end_iter = mChildren.end(); iter != end_iter; ++iter) { - // LLFolderViewModelItem LLPersonModelCommon* item = dynamic_cast<LLPersonModelCommon*>(*iter); item->filter(filter); } } else { + // If there's no children, the current instance is a person and we check and set the passed filter flag on it const bool passed_filter = filter.check(this); setPassedFilter(passed_filter, -1, filter.getStringMatchOffset(this), filter.getFilterStringSize()); } diff --git a/indra/newview/llpersonmodelcommon.h b/indra/newview/llpersonmodelcommon.h index ffd145b549..f44f619d18 100644 --- a/indra/newview/llpersonmodelcommon.h +++ b/indra/newview/llpersonmodelcommon.h @@ -175,14 +175,6 @@ public: void setModified(EFilterModified behavior = FILTER_RESTART) { mFilterModified = behavior; } // +-------------------------------------------------------------------+ - // + Count - // +-------------------------------------------------------------------+ - // Note : we currently filter the whole person list at once, no need to count then. - //void setFilterCount(S32 count) { } - //S32 getFilterCount() const { return 1; } - //void decrementFilterCount() { } - - // +-------------------------------------------------------------------+ // + Time // +-------------------------------------------------------------------+ // Note : we currently filter the whole person list at once, no need to timeout then. |