diff options
| author | Merov Linden <merov@lindenlab.com> | 2013-05-02 18:47:56 -0700 | 
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2013-05-02 18:47:56 -0700 | 
| commit | 6cce8629b962cd73515e2d0a85620b602e57a0fe (patch) | |
| tree | 0e24eea2f0814accb24daf964338df7fa0f2bb9f | |
| parent | 2a7d604e87df5a48bfb0abeb0d7b897a117005fb (diff) | |
CHUI-275 : WIP : Cleaned up comments
| -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. | 
