summaryrefslogtreecommitdiff
path: root/src/organizercore.cpp
diff options
context:
space:
mode:
authorKrzysztof Starecki <krzysztof.starecki@gmail.com>2019-02-15 22:01:36 +0100
committerKrzysztof Starecki <krzysztof.starecki@gmail.com>2019-02-15 22:01:36 +0100
commit55249ba3a6e2b4d51c259c0eff0c1d97ab6be614 (patch)
tree64577d4bef8a8b86427775f4e64bc276d23005e3 /src/organizercore.cpp
parent4d8920cec1f35e502c653e1b5725a49a4d321626 (diff)
Reject new mod installations if another one is already running
Diffstat (limited to 'src/organizercore.cpp')
-rw-r--r--src/organizercore.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp
index 4dceefbf..a668de6b 100644
--- a/src/organizercore.cpp
+++ b/src/organizercore.cpp
@@ -988,6 +988,13 @@ MOBase::IModInterface *OrganizerCore::installMod(const QString &fileName,
return nullptr;
}
+ if (m_InstallationManager.isRunning()) {
+ QMessageBox::information(
+ qApp->activeWindow(), tr("Installation cancelled"),
+ tr("Another installation is currently in progress."), QMessageBox::Ok);
+ return nullptr;
+ }
+
bool hasIniTweaks = false;
GuessedValue<QString> modName;
if (!initModName.isEmpty()) {
@@ -1029,6 +1036,13 @@ MOBase::IModInterface *OrganizerCore::installMod(const QString &fileName,
void OrganizerCore::installDownload(int index)
{
+ if (m_InstallationManager.isRunning()) {
+ QMessageBox::information(
+ qApp->activeWindow(), tr("Installation cancelled"),
+ tr("Another installation is currently in progress."), QMessageBox::Ok);
+ return;
+ }
+
try {
QString fileName = m_DownloadManager.getFilePath(index);
QString gameName = m_DownloadManager.getGameName(index);