diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/modlistsortproxy.cpp | 3 | ||||
| -rw-r--r-- | src/qtgroupingproxy.cpp | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp index efe60732..39631b67 100644 --- a/src/modlistsortproxy.cpp +++ b/src/modlistsortproxy.cpp @@ -21,6 +21,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "modinfo.h"
#include "profile.h"
#include "messagedialog.h"
+#include "qtgroupingproxy.h"
#include <QMenu>
#include <QCheckBox>
#include <QWidgetAction>
@@ -362,7 +363,7 @@ bool ModListSortProxy::dropMimeData(const QMimeData *data, Qt::DropAction action return false;
}
if ((row == -1) && (column == -1)) {
- return this->sourceModel()->dropMimeData(data, action, -1, -1, mapToSource(parent));
+ return sourceModel()->dropMimeData(data, action, -1, -1, mapToSource(parent));
}
// in the regular model, when dropping between rows, the row-value passed to
// the sourceModel is inconsistent between ascending and descending ordering.
diff --git a/src/qtgroupingproxy.cpp b/src/qtgroupingproxy.cpp index c5ee8591..5fcb84d3 100644 --- a/src/qtgroupingproxy.cpp +++ b/src/qtgroupingproxy.cpp @@ -877,9 +877,12 @@ QtGroupingProxy::dropMimeData(const QMimeData *data, Qt::DropAction action, int QModelIndex newIdx = mapToSource(index(max, column, idx));
return sourceModel()->dropMimeData(data, action, max, column, newIdx);
} else {
- QModelIndex idx = mapToSource(index(row, column, parent));
-
- return sourceModel()->dropMimeData(data, action, idx.row(), idx.column(), idx.parent());
+ if (row == -1) {
+ return sourceModel()->dropMimeData(data, action, -1, -1, mapToSource(parent));
+ } else {
+ QModelIndex idx = mapToSource(index(row, column, parent));
+ return sourceModel()->dropMimeData(data, action, idx.row(), idx.column(), idx.parent());
+ }
}
}
|
