diff options
| author | Tannin <devnull@localhost> | 2015-06-29 20:38:16 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-06-29 20:38:16 +0200 |
| commit | 1e75fd8daeff5329c067919941404e67d5d195c7 (patch) | |
| tree | fb7b92640e852856b71fa85aead4fe4760d1a902 /src | |
| parent | 61033814fde8d863336061b622b0ad011930dc18 (diff) | |
bugfix: dropping files from overwrite on mod failed whien mod grouping was active
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());
+ }
}
}
|
