diff options
| -rw-r--r-- | src/modlistbypriorityproxy.cpp | 5 | ||||
| -rw-r--r-- | src/modlistbypriorityproxy.h | 2 |
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>()); |
