summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modlistsortproxy.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp
index bff26e8d..94139715 100644
--- a/src/modlistsortproxy.cpp
+++ b/src/modlistsortproxy.cpp
@@ -58,18 +58,12 @@ void ModListSortProxy::updateFilterActive()
void ModListSortProxy::setCategoryFilter(const std::vector<int> &categories)
{
- m_CategoryFilter = categories;
- updateFilterActive();
- invalidate();
-
- //For better performance we could refresh only if the filter is different or
- //categories contains CATEGORY_SPECIAL_UPDATEAVAILABLE
- /*
- if (categories != m_CategoryFilter) {
+ //avoid refreshing the filter unless we are checking all mods for update.
+ if (categories != m_CategoryFilter || categories.at(0) == CategoryFactory::CATEGORY_SPECIAL_UPDATEAVAILABLE) {
m_CategoryFilter = categories;
updateFilterActive();
invalidate();
- }*/
+ }
}
void ModListSortProxy::setContentFilter(const std::vector<int> &content)