summaryrefslogtreecommitdiff
path: root/indra/llui/llfolderview.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-04-18 19:46:08 -0700
committerMerov Linden <merov@lindenlab.com>2013-04-18 19:46:08 -0700
commit03ad10d258095487d6ae8f26634932bc832f10df (patch)
tree83491d98bfaf65cd73dc69b21001b324e8173caf /indra/llui/llfolderview.cpp
parente84c97e86d51b4f890695182c8087288481b6955 (diff)
CHUI-849 : WIP : Filter limit on time instead of number of items
Diffstat (limited to 'indra/llui/llfolderview.cpp')
-rw-r--r--indra/llui/llfolderview.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index c9e88ab72f..f3da71fc15 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -325,9 +325,19 @@ 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.setFilterCount(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsPerFrame"), 1, 5000));
+ filter.resetTime(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsMaxTimePerFrame"), 1, 1000));
// 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)
@@ -1614,7 +1624,8 @@ void LLFolderView::update()
// 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))
+ //if (getFolderViewModel()->getFilter().isModified() && (getFolderViewModel()->getFilter().getFilterCount() > 0))
+ if (getFolderViewModel()->getFilter().isModified() && (!getFolderViewModel()->getFilter().isTimedOut()))
{
getFolderViewModel()->getFilter().clearModified();
}