From 1266e13921812ac647e1b788fab5eb04e8267ec9 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Tue, 11 Dec 2018 01:52:53 -0600 Subject: Add the ability to change the managed game directory --- src/mainwindow.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2551aa2a..834a1fce 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4178,11 +4178,22 @@ void MainWindow::on_actionSettings_triggered() QString oldModDirectory(settings.getModDirectory()); QString oldCacheDirectory(settings.getCacheDirectory()); QString oldProfilesDirectory(settings.getProfileDirectory()); + QString oldManagedGameDirectory(settings.getManagedGameDirectory()); bool oldDisplayForeign(settings.displayForeign()); bool proxy = settings.useProxy(); + DownloadManager *dlManager = m_OrganizerCore.downloadManager(); settings.query(&m_PluginContainer, this); + if (oldManagedGameDirectory != settings.getManagedGameDirectory()) { + QMessageBox::about(this, tr("Restarting MO"), + tr("Changing the managed game directory requires restarting MO.\n" + "Any pending downloads will be paused.\n\n" + "Click OK to restart MO now.")); + dlManager->pauseAll(); + qApp->exit(INT_MAX); + } + InstallationManager *instManager = m_OrganizerCore.installationManager(); instManager->setModsDirectory(settings.getModDirectory()); instManager->setDownloadDirectory(settings.getDownloadDirectory()); @@ -4194,8 +4205,6 @@ void MainWindow::on_actionSettings_triggered() refreshProfiles(); } - DownloadManager *dlManager = m_OrganizerCore.downloadManager(); - if (dlManager->getOutputDirectory() != settings.getDownloadDirectory()) { if (dlManager->downloadsInProgress()) { MessageDialog::showMessage(tr("Can't change download directory while " -- cgit v1.3.1