From e53905329a7a204ad0ad41600a9fb3040b942991 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Mon, 11 Jan 2021 18:55:15 +0100 Subject: Allow collapsible separator in descending priority. --- src/modlistsortproxy.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/modlistsortproxy.cpp') diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp index 9ae37a43..0682b9c3 100644 --- a/src/modlistsortproxy.cpp +++ b/src/modlistsortproxy.cpp @@ -617,6 +617,13 @@ bool ModListSortProxy::canDropMimeData(const QMimeData* data, Qt::DropAction act } } + // in the regular model, when dropping between rows, the row-value passed to + // the sourceModel is inconsistent between ascending and descending ordering. + // This should fix that + if (sortOrder() == Qt::DescendingOrder) { + --row; + } + return QSortFilterProxyModel::canDropMimeData(data, action, row, column, parent); } -- cgit v1.3.1