Add configurable option on ScrollMessageBox (#4335)

This commit is contained in:
Alexandru Ionut Tripon 2026-01-31 14:03:32 +02:00 committed by GitHub
commit 3270288031
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 43 additions and 12 deletions

View file

@ -178,13 +178,21 @@ void ResourceUpdateDialog::checkCandidates()
ScrollMessageBox message_dialog(m_parent, tr("Failed to check for updates"),
tr("Could not check or get the following resources for updates:<br>"
"Do you wish to proceed without those resources?"),
text);
text, "Disable unavailable mods");
message_dialog.setModal(true);
if (message_dialog.exec() == QDialog::Rejected) {
m_aborted = true;
QMetaObject::invokeMethod(this, "reject", Qt::QueuedConnection);
return;
}
// Disable unavailable mods
if (message_dialog.isOptionChecked()) {
for (const auto& failed : m_failedCheckUpdate) {
const auto& mod = std::get<0>(failed);
mod->enable(EnableAction::DISABLE);
}
}
}
if (m_includeDeps && !APPLICATION->settings()->get("ModDependenciesDisabled").toBool()) { // dependencies