diff --git a/resources/text/CHANGELOG b/resources/text/CHANGELOG index da2264c27..162bcdc99 100644 --- a/resources/text/CHANGELOG +++ b/resources/text/CHANGELOG @@ -3,7 +3,7 @@ Fixed: Added: diff --git a/src/gui/formsettings.cpp b/src/gui/formsettings.cpp index a167fa316..2d81a4fc1 100755 --- a/src/gui/formsettings.cpp +++ b/src/gui/formsettings.cpp @@ -248,14 +248,18 @@ void FormSettings::promptForRestart() { if (!m_changedDataTexts.isEmpty()) { QStringList changed_settings_description = m_changedDataTexts.replaceInStrings(QRegExp("^"), QString::fromUtf8(" • ")); - MessageBox::show(this, - QMessageBox::Question, - tr("Critical settings were changed"), - tr("Some critical settings were changed and will be applied after the application gets restarted. " - "\n\nYou have to restart manually."), - QString(), - tr("List of changes:\n%1.").arg(changed_settings_description .join(",\n")), - QMessageBox::Ok, QMessageBox::Ok); + QMessageBox::StandardButton clicked_button = MessageBox::show(this, + QMessageBox::Question, + tr("Critical settings were changed"), + tr("Some critical settings were changed and will be applied after the application gets restarted. " + "\n\nYou have to restart manually."), + tr("Do you want to restart now?"), + tr("List of changes:\n%1.").arg(changed_settings_description .join(",\n")), + QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); + + if (clicked_button == QMessageBox::Yes) { + qApp->restart(); + } } } diff --git a/src/miscellaneous/application.cpp b/src/miscellaneous/application.cpp index 83e093e73..f51d31e4f 100755 --- a/src/miscellaneous/application.cpp +++ b/src/miscellaneous/application.cpp @@ -186,4 +186,3 @@ void Application::restart() { m_shouldRestart = true; quit(); } -