From 2b21463514a46e7f3600f32560a0e944d15a2750 Mon Sep 17 00:00:00 2001 From: Tannin Date: Wed, 7 Jan 2015 23:13:40 +0100 Subject: - download servers that haven't been available for over a month are now purged from the known servers list - bugfix: encoding detection for fomod xmls could incorrectly interpret files as utf16 encoded - bugfix: hashing algorithm for bsa files was wrong - bugfix: nxmhandler reported non-issues as errors - bugfix: nxmhandler tried to apply chrome fix on every start - bugfix: "not endorsed" icon displayed for non-nexus mods - bugfix: when drag&dropping within the overwrite dialog the file might still get moved to a mod (and probably not the intended one) - bugfix: dropping files from overwrite on the modlist was refused when not sorting by priority (only in 1.2.15) - bugfix: unmanaged mods couldn't be reordered (only in 1.2.15) --- src/modlistsortproxy.cpp | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'src/modlistsortproxy.cpp') diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp index 4e066eb8..b0e33bf2 100644 --- a/src/modlistsortproxy.cpp +++ b/src/modlistsortproxy.cpp @@ -26,6 +26,7 @@ along with Mod Organizer. If not, see . #include #include #include +#include #include #include @@ -324,23 +325,23 @@ bool ModListSortProxy::filterAcceptsRow(int row, const QModelIndex &parent) cons bool ModListSortProxy::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) { - if (sortColumn() != ModList::COL_PRIORITY) { - QWidget *wid = qApp->activeWindow()->findChild("modList"); - MessageDialog::showMessage(tr("Drag&Drop is only supported when sorting by priority"), wid); - return false; - } - if ((row == -1) && (column == -1)) { - return this->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. - // This should fix that - if (sortOrder() == Qt::DescendingOrder) { - --row; - } + if (!data->hasUrls() && (sortColumn() != ModList::COL_PRIORITY)) { + QWidget *wid = qApp->activeWindow()->findChild("modList"); + MessageDialog::showMessage(tr("Drag&Drop is only supported when sorting by priority"), wid); + return false; + } + if ((row == -1) && (column == -1)) { + return this->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. + // This should fix that + if (sortOrder() == Qt::DescendingOrder) { + --row; + } - QModelIndex proxyIndex = index(row, column, parent); - QModelIndex sourceIndex = mapToSource(proxyIndex); - return this->sourceModel()->dropMimeData(data, action, sourceIndex.row(), sourceIndex.column(), - sourceIndex.parent()); + QModelIndex proxyIndex = index(row, column, parent); + QModelIndex sourceIndex = mapToSource(proxyIndex); + return this->sourceModel()->dropMimeData(data, action, sourceIndex.row(), sourceIndex.column(), + sourceIndex.parent()); } -- cgit v1.3.1