diff --git a/src/Gui/ConfigDialog.cpp b/src/Gui/ConfigDialog.cpp index 03f9544e6..270a26ddb 100644 --- a/src/Gui/ConfigDialog.cpp +++ b/src/Gui/ConfigDialog.cpp @@ -268,10 +268,11 @@ void ConfigDialog::saveClicked() // we want our own buttons... msgBox.addButton(tr("No, Keep current"), QMessageBox::RejectRole); - msgBox.addButton(tr("Yes, Apply and Restart"), QMessageBox::AcceptRole); + QAbstractButton *acceptButton = msgBox.addButton(tr("Yes, Apply and Restart"), QMessageBox::AcceptRole); msgBox.setDefaultButton(QMessageBox::Abort); + msgBox.exec(); - if (msgBox.exec() == 1) { // accept! + if (msgBox.clickedButton() == acceptButton) { // lets restart restarting = true;