summaryrefslogtreecommitdiff
path: root/src/modlistsortproxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modlistsortproxy.cpp')
-rw-r--r--src/modlistsortproxy.cpp4
1 files changed, 2 insertions, 2 deletions
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;
}