From 08520822eb91c065a0893da0e2e9d11574450208 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Mon, 11 Jan 2021 19:15:39 +0100 Subject: Fix drop in separator and create mod in separator in descending priority. --- src/modlistsortproxy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modlistsortproxy.cpp') diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp index 0682b9c3..bc28490f 100644 --- a/src/modlistsortproxy.cpp +++ b/src/modlistsortproxy.cpp @@ -620,7 +620,7 @@ 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) { + if (sortOrder() == Qt::DescendingOrder && row != -1) { --row; } @@ -645,7 +645,7 @@ bool ModListSortProxy::dropMimeData(const QMimeData *data, Qt::DropAction action // 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) { + if (sortOrder() == Qt::DescendingOrder && row != -1) { --row; } -- cgit v1.3.1