ATLauncher: Abort install if optional mods dialog is closed

This matches the behaviour of ATLauncher.
This commit is contained in:
Jamie Mansfield 2022-10-20 18:30:32 +01:00
parent 54c26b05fa
commit a6b13487f0
No known key found for this signature in database
GPG key ID: 36F61598F39F67B0
4 changed files with 13 additions and 5 deletions

View file

@ -736,7 +736,12 @@ void PackInstallTask::downloadMods()
QVector<QString> selectedMods;
if (!optionalMods.isEmpty()) {
setStatus(tr("Selecting optional mods..."));
selectedMods = m_support->chooseOptionalMods(m_version, optionalMods);
auto mods = m_support->chooseOptionalMods(m_version, optionalMods);
if (!mods.has_value()) {
emitAborted();
return;
}
selectedMods = mods.value();
}
setStatus(tr("Downloading mods..."));