From 55249ba3a6e2b4d51c259c0eff0c1d97ab6be614 Mon Sep 17 00:00:00 2001 From: Krzysztof Starecki Date: Fri, 15 Feb 2019 22:01:36 +0100 Subject: Reject new mod installations if another one is already running --- src/organizercore.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/organizercore.cpp') 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 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); -- cgit v1.3.1