diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/modlistsortproxy.cpp | 12 | ||||
| -rw-r--r-- | src/qtgroupingproxy.cpp | 9 | ||||
| -rw-r--r-- | src/version.rc | 4 |
3 files changed, 16 insertions, 9 deletions
diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp index f646a079..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.
@@ -380,9 +381,12 @@ bool ModListSortProxy::dropMimeData(const QMimeData *data, Qt::DropAction action void ModListSortProxy::setSourceModel(QAbstractItemModel *sourceModel)
{
QSortFilterProxyModel::setSourceModel(sourceModel);
-
- connect(sourceModel, SIGNAL(aboutToChangeData()), this, SLOT(aboutToChangeData()));
- connect(sourceModel, SIGNAL(postDataChanged()), this, SLOT(postDataChanged()));
+ QtGroupingProxy *proxy = qobject_cast<QtGroupingProxy*>(sourceModel);
+ if (proxy != nullptr) {
+ sourceModel = proxy->sourceModel();
+ }
+ connect(sourceModel, SIGNAL(aboutToChangeData()), this, SLOT(aboutToChangeData()), Qt::UniqueConnection);
+ connect(sourceModel, SIGNAL(postDataChanged()), this, SLOT(postDataChanged()), Qt::UniqueConnection);
}
void ModListSortProxy::aboutToChangeData()
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());
+ }
}
}
diff --git a/src/version.rc b/src/version.rc index 8a299a2d..93de7128 100644 --- a/src/version.rc +++ b/src/version.rc @@ -1,7 +1,7 @@ #include "Winver.h"
-#define VER_FILEVERSION 1,3,8,0
-#define VER_FILEVERSION_STR "1,3,8,0\0"
+#define VER_FILEVERSION 1,3,9,0
+#define VER_FILEVERSION_STR "1,3,9,0\0"
VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_FILEVERSION
|
