summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfolderview.cpp15
-rwxr-xr-xindra/llui/llfolderviewitem.cpp2
-rw-r--r--indra/llui/llfolderviewmodel.cpp3
-rw-r--r--indra/llui/llfolderviewmodel.h7
4 files changed, 23 insertions, 4 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();
}
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 96961e7a4f..6c147ccc12 100755
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -949,7 +949,7 @@ static LLFastTimer::DeclareTimer FTM_ARRANGE("Arrange");
// * Turn widgets visible/invisible according to their model filtering state
// * Takes animation state into account for opening/closing of folders (this makes widgets visible/invisible)
// * Reposition visible widgets so that they line up correctly with no gap
-// * Compute the width and height of the cuurent folder and its children
+// * Compute the width and height of the current folder and its children
// * Makes sure that this view and its children are the right size
S32 LLFolderViewFolder::arrange( S32* width, S32* height )
{
diff --git a/indra/llui/llfolderviewmodel.cpp b/indra/llui/llfolderviewmodel.cpp
index 3593804554..b5622756fe 100644
--- a/indra/llui/llfolderviewmodel.cpp
+++ b/indra/llui/llfolderviewmodel.cpp
@@ -48,7 +48,8 @@ std::string LLFolderViewModelCommon::getStatusText()
void LLFolderViewModelCommon::filter()
{
- getFilter().setFilterCount(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsPerFrame"), 1, 5000));
+ //getFilter().setFilterCount(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsPerFrame"), 1, 5000));
+ getFilter().resetTime(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsMaxTimePerFrame"), 1, 1000));
mFolderView->getViewModelItem()->filter(getFilter());
}
diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h
index dbcbb0edeb..64c00c782e 100644
--- a/indra/llui/llfolderviewmodel.h
+++ b/indra/llui/llfolderviewmodel.h
@@ -94,6 +94,13 @@ public:
virtual void decrementFilterCount() = 0;
// +-------------------------------------------------------------------+
+ // + Time
+ // +-------------------------------------------------------------------+
+ virtual void resetTime(S32 timeout) = 0;
+ virtual bool isTimedOut() = 0;
+ virtual void incrementFilterCount() = 0; // Temp!
+
+ // +-------------------------------------------------------------------+
// + Default
// +-------------------------------------------------------------------+
virtual bool isDefault() const = 0;