summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSilarn <jrim@rimpo.org>2018-04-07 22:18:45 -0500
committerSilarn <jrim@rimpo.org>2018-04-07 22:18:45 -0500
commitcc2bd152568a4f1164a0a4ba5e6232e77e7c9945 (patch)
treed377aabd0532ae77d5b33ea37bb1f5e6b85e78a9 /src
parentb409a0bef934eb20d10ecd2f7448c2da00c8e500 (diff)
Fix for re-downloading a mod already downloading
Diffstat (limited to 'src')
-rw-r--r--src/downloadmanager.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index a4fde093..c0d7fbf3 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -460,7 +460,14 @@ void DownloadManager::addNXMDownload(const QString &url)
return;
}
+ if (m_PendingDownloads.contains(std::pair<int, int>(nxmInfo.modId(), nxmInfo.fileId()))) {
+ qDebug("download requested is already started (mod: %s, file: %s)", qPrintable(nxmInfo.modId()), qPrintable(nxmInfo.fileId()));
+ QMessageBox::information(nullptr, tr("Already Started"), tr("A download for this mod file has already been started."), QMessageBox::Ok);
+ return;
+ }
+
emit aboutToUpdate();
+
m_PendingDownloads.append(std::make_pair(nxmInfo.modId(), nxmInfo.fileId()));
emit update(-1);