summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikaƫl Capelle <capelle.mikael@gmail.com>2021-01-20 09:19:53 +0100
committerGitHub <noreply@github.com>2021-01-20 09:19:53 +0100
commit7caa9806bc8b7d80dd6377bdebcef988ad9fcb13 (patch)
tree35a43390ecb967166418d13907dd0e2a58d54ebc /src
parent7b1f1f29da29ed57b76460028297c3974dc3a86e (diff)
parent932a562d9d36d10ec29821ee0af957f0dd3da498 (diff)
Merge pull request #1375 from Holt59/fix-collapsible-separators-reverse
Fix refresh on by-priority proxy when changing sort order.
Diffstat (limited to 'src')
-rw-r--r--src/modlistbypriorityproxy.cpp5
-rw-r--r--src/modlistbypriorityproxy.h2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/modlistbypriorityproxy.cpp b/src/modlistbypriorityproxy.cpp
index ac50e823..7dae7a54 100644
--- a/src/modlistbypriorityproxy.cpp
+++ b/src/modlistbypriorityproxy.cpp
@@ -41,7 +41,10 @@ void ModListByPriorityProxy::setProfile(Profile* profile)
void ModListByPriorityProxy::setSortOrder(Qt::SortOrder order)
{
- m_sortOrder = order;
+ if (m_sortOrder != order) {
+ m_sortOrder = order;
+ onModelLayoutChanged();
+ }
}
void ModListByPriorityProxy::buildMapping()
diff --git a/src/modlistbypriorityproxy.h b/src/modlistbypriorityproxy.h
index 77e0fe3d..0629bef7 100644
--- a/src/modlistbypriorityproxy.h
+++ b/src/modlistbypriorityproxy.h
@@ -54,7 +54,7 @@ public slots:
protected slots:
void onModelRowsRemoved(const QModelIndex& parent, int first, int last);
- void onModelLayoutChanged(const QList<QPersistentModelIndex>& parents, LayoutChangeHint hint);
+ void onModelLayoutChanged(const QList<QPersistentModelIndex>& parents = {}, LayoutChangeHint hint = LayoutChangeHint::NoLayoutChangeHint);
void onModelReset();
void onModelDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector<int>& roles = QVector<int>());