diff options
| author | Qudix <17361645+Qudix@users.noreply.github.com> | 2020-11-14 19:45:23 -0600 |
|---|---|---|
| committer | Qudix <17361645+Qudix@users.noreply.github.com> | 2020-11-14 19:45:23 -0600 |
| commit | 67188a39cb6aa9d1cad172aec6aac9977af8e79a (patch) | |
| tree | 3e4e31887a57b49747c31c342077a164025f9066 /src/createinstancedialog.cpp | |
| parent | b9ec979b4c884b35981d0d6fe0abe914e00daa54 (diff) | |
| parent | 4833e494d56b351e52423f2835a7a91ab8c284b6 (diff) | |
Merge branch 'master' of https://github.com/ModOrganizer2/modorganizer into tracking_integration
Diffstat (limited to 'src/createinstancedialog.cpp')
| -rw-r--r-- | src/createinstancedialog.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/createinstancedialog.cpp b/src/createinstancedialog.cpp index 47cb9d5c..a4e3c336 100644 --- a/src/createinstancedialog.cpp +++ b/src/createinstancedialog.cpp @@ -131,7 +131,7 @@ CreateInstanceDialog::CreateInstanceDialog( ui->pages->setCurrentIndex(0); ui->launch->setChecked(true); - if (!m_settings) + if (!InstanceManager::singleton().hasAnyInstances()) { // first run of MO, there are no instances yet, force launch ui->launch->setEnabled(false); @@ -314,6 +314,10 @@ void CreateInstanceDialog::finish() }; + // don't restart if this is the first instance, it'll be selected and opened + const bool mustRestart = InstanceManager::singleton().hasAnyInstances(); + + try { std::vector<std::unique_ptr<DirectoryCreator>> dirs; @@ -396,9 +400,7 @@ void CreateInstanceDialog::finish() if (ui->launch->isChecked()) { InstanceManager::singleton().setCurrentInstance(ci.instanceName); - if (m_settings) { - // don't restart without settings, it happens on startup when there are - // no instances + if (mustRestart) { ExitModOrganizer(Exit::Restart); m_switching = true; } |
