diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-04-30 16:28:40 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-04-30 16:32:16 +0300 |
commit | 59433e3132b057003afcc1ba230ff16ffe62f92c (patch) | |
tree | 16f94bc4265881544a34388875ff7631004e1e53 /indra/llui/llfolderview.cpp | |
parent | d70b749101f5a954fc824e73519102a0d88f24ae (diff) |
SL-13119 Made control settings cached and fixed potential filtering issue
Diffstat (limited to 'indra/llui/llfolderview.cpp')
-rw-r--r-- | indra/llui/llfolderview.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index e718fcec46..0c1dcc301b 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -342,7 +342,9 @@ static LLTrace::BlockTimerStatHandle FTM_FILTER("Filter Folder View"); void LLFolderView::filter( LLFolderViewFilter& filter ) { LL_RECORD_BLOCK_TIME(FTM_FILTER); - filter.resetTime(llclamp(LLUI::getInstance()->mSettingGroups["config"]->getS32(mParentPanel.get()->getVisible() ? "FilterItemsMaxTimePerFrameVisible" : "FilterItemsMaxTimePerFrameUnvisible"), 1, 100)); + static LLCachedControl<S32> filter_visible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10); + static LLCachedControl<S32> filter_hidden(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameUnvisible", 1); + filter.resetTime(llclamp(mParentPanel.get()->getVisible() ? filter_visible() : filter_hidden(), 1, 100)); // Note: we filter the model, not the view getViewModelItem()->filter(filter); |