diff options
author | Merov Linden <merov@lindenlab.com> | 2013-04-19 16:51:44 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-04-19 16:51:44 -0700 |
commit | 2cc1fb250f78df3a4b8f33b13b30defef7efb78a (patch) | |
tree | 3090305f95c8c564913579a407749544a7f712d2 /indra/llui | |
parent | 03ad10d258095487d6ae8f26634932bc832f10df (diff) |
CHUI-849 : Use a time limit for filtering instead of number limit, use a different limit for visible and unvisible lists
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfolderview.cpp | 18 | ||||
-rw-r--r-- | indra/llui/llfolderviewmodel.cpp | 3 | ||||
-rw-r--r-- | indra/llui/llfolderviewmodel.h | 8 |
3 files changed, 5 insertions, 24 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index f3da71fc15..bf4d5ae1f9 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -325,19 +325,10 @@ void LLFolderView::filter( LLFolderViewFilter& filter ) { // Entry point of inventory filtering (CHUI-849) LLFastTimer t2(FTM_FILTER); - //filter.setFilterCount(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsPerFrame"), 1, 5000)); - filter.resetTime(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsMaxTimePerFrame"), 1, 1000)); + filter.resetTime(llclamp(LLUI::sSettingGroups["config"]->getS32(mParentPanel->getVisible() ? "FilterItemsMaxTimePerFrameVisible" : "FilterItemsMaxTimePerFrameUnvisible"), 1, 100)); + // Note: we filter the model, not the view getViewModelItem()->filter(filter); - // Test the filter state - if (filter.isTimedOut()) - { - llinfos << "Merov : filter of " << mParentPanel->getName() << " not finished, count = " << filter.getFilterCount() << llendl; - } - else if (filter.getFilterCount() != 0) - { - llinfos << "Merov : last filter of " << mParentPanel->getName() << " done! count = " << filter.getFilterCount() << llendl; - } } void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent) @@ -1622,9 +1613,8 @@ void LLFolderView::update() // Filter to determine visibility before arranging filter(getFolderViewModel()->getFilter()); - // Clear the modified setting on the filter only if the filter count is non-zero after running the filter process - // Note: if the filter count is zero, that means the filter exhausted its count per frame and halted before completing the entire set of items - //if (getFolderViewModel()->getFilter().isModified() && (getFolderViewModel()->getFilter().getFilterCount() > 0)) + // Clear the modified setting on the filter only if the filter finished after running the filter process + // Note: if the filter count has timed out, that means the filter halted before completing the entire set of items if (getFolderViewModel()->getFilter().isModified() && (!getFolderViewModel()->getFilter().isTimedOut())) { getFolderViewModel()->getFilter().clearModified(); diff --git a/indra/llui/llfolderviewmodel.cpp b/indra/llui/llfolderviewmodel.cpp index b5622756fe..3363dc5316 100644 --- a/indra/llui/llfolderviewmodel.cpp +++ b/indra/llui/llfolderviewmodel.cpp @@ -48,8 +48,7 @@ std::string LLFolderViewModelCommon::getStatusText() void LLFolderViewModelCommon::filter() { - //getFilter().setFilterCount(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsPerFrame"), 1, 5000)); - getFilter().resetTime(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsMaxTimePerFrame"), 1, 1000)); + getFilter().resetTime(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsMaxTimePerFrameVisible"), 1, 100)); mFolderView->getViewModelItem()->filter(getFilter()); } diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index 64c00c782e..b1bcc8bbb4 100644 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -87,18 +87,10 @@ public: virtual void setModified(EFilterModified behavior = FILTER_RESTART) = 0; // +-------------------------------------------------------------------+ - // + Count - // +-------------------------------------------------------------------+ - virtual void setFilterCount(S32 count) = 0; - virtual S32 getFilterCount() const = 0; - virtual void decrementFilterCount() = 0; - - // +-------------------------------------------------------------------+ // + Time // +-------------------------------------------------------------------+ virtual void resetTime(S32 timeout) = 0; virtual bool isTimedOut() = 0; - virtual void incrementFilterCount() = 0; // Temp! // +-------------------------------------------------------------------+ // + Default |