diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-12-27 18:45:06 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-02 15:38:15 +0100 |
| commit | 1e2297604b797f1ea15d91b43f227114deedaeb0 (patch) | |
| tree | 2e7fb5e9703aa91fa636340dcb5d345629088119 /src/mainwindow.cpp | |
| parent | e4473d8fd500cd8af2f5131a0a22deb4697846d7 (diff) | |
Restrict collapsible separators to sort-by-priority in ascending order.
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 173dc53d..15564c21 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -561,7 +561,7 @@ void MainWindow::setupModList() connect(m_ModListSortProxy, &QAbstractItemModel::layoutAboutToBeChanged, this, [this](const QList<QPersistentModelIndex>& parents, QAbstractItemModel::LayoutChangeHint hint) { if (hint == QAbstractItemModel::VerticalSortHint) { - if (m_ModListSortProxy->sortColumn() == ModList::COL_PRIORITY) { + if (m_ModListSortProxy->sortColumn() == ModList::COL_PRIORITY && m_ModListSortProxy->sortOrder() == Qt::AscendingOrder) { m_ModListSortProxy->setSourceModel(m_ModListByPriorityProxy); emit m_OrganizerCore.modList()->layoutChanged(); } @@ -5964,7 +5964,7 @@ void MainWindow::on_groupCombo_currentIndexChanged(int index) connect(ui->modList, SIGNAL(collapsed(QModelIndex)), newModel, SLOT(collapsed(QModelIndex))); connect(newModel, SIGNAL(expandItem(QModelIndex)), this, SLOT(expandModList(QModelIndex))); } else { - if (m_ModListSortProxy->sortColumn() == ModList::COL_PRIORITY) { + if (m_ModListSortProxy->sortColumn() == ModList::COL_PRIORITY && m_ModListSortProxy->sortOrder() == Qt::AscendingOrder) { m_ModListSortProxy->setSourceModel(m_ModListByPriorityProxy); emit m_OrganizerCore.modList()->layoutChanged(); } |
