summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-16 22:06:20 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-16 22:06:20 +0100
commitf46962686a0648abe06bea699365740546107a70 (patch)
tree5a68117cc28a71759b3f2687d6665fac8c45e4f9
parente6d1f5500bfa41e20f12d88ab0c6d7d4717c8465 (diff)
Fix drag&drop in manual installer after drag&drop of download/external archive in mod list.
-rw-r--r--src/modlistview.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/modlistview.cpp b/src/modlistview.cpp
index cb1d2842..526e9c33 100644
--- a/src/modlistview.cpp
+++ b/src/modlistview.cpp
@@ -829,13 +829,16 @@ void ModListView::setup(OrganizerCore& core, CategoryFactory& factory, MainWindo
// prevent the name-column from being hidden
header()->setSectionHidden(ModList::COL_NAME, false);
- connect(m_core->modList(), &ModList::downloadArchiveDropped, [=](int row, int priority) {
+ // we need QueuedConnection for the download/archive dropped otherwise the
+ // installation starts within the drop-event and it's not possible to drag&drop
+ // in the manual installer
+ connect(m_core->modList(), &ModList::downloadArchiveDropped, this, [=](int row, int priority) {
m_core->installDownload(row, priority);
- });
- connect(m_core->modList(), &ModList::externalArchiveDropped, [=](const QUrl& url, int priority) {
+ }, Qt::QueuedConnection);
+ connect(m_core->modList(), &ModList::externalArchiveDropped, this, [=](const QUrl& url, int priority) {
setWindowState(Qt::WindowActive);
m_core->installArchive(url.toLocalFile(), priority, false, nullptr);
- });
+ }, Qt::QueuedConnection);
connect(m_core->modList(), &ModList::externalFolderDropped, this, &ModListView::onExternalFolderDropped);
connect(selectionModel(), &QItemSelectionModel::selectionChanged, [=] { m_refreshMarkersTimer.start(); });