X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsettingsdlg.cpp;h=b5fc125c2e1e131f2e021140b0e5b0c37dd04056;hp=035993b9e6723ac1181ddc2d4927bfb79149834f;hb=569bfa97ac24d59a77c1debf92fce356c2dc5826;hpb=43159be08b173c4c1c973eb3ea26cdaae191fc2f diff --git a/src/qtui/settingsdlg.cpp b/src/qtui/settingsdlg.cpp index 035993b9..b5fc125c 100644 --- a/src/qtui/settingsdlg.cpp +++ b/src/qtui/settingsdlg.cpp @@ -113,7 +113,6 @@ void SettingsDlg::itemSelected() { void SettingsDlg::setButtonStates() { SettingsPage *sp = currentPage(); - ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(sp && sp->hasChanged()); ui.buttonBox->button(QDialogButtonBox::Apply)->setEnabled(sp && sp->hasChanged()); ui.buttonBox->button(QDialogButtonBox::Reset)->setEnabled(sp && sp->hasChanged()); ui.buttonBox->button(QDialogButtonBox::RestoreDefaults)->setEnabled(sp && sp->hasDefaults()); @@ -122,7 +121,9 @@ void SettingsDlg::setButtonStates() { void SettingsDlg::buttonClicked(QAbstractButton *button) { switch(ui.buttonBox->standardButton(button)) { case QDialogButtonBox::Ok: - if(applyChanges()) accept(); + if(currentPage() && currentPage()->hasChanged()) { + if(applyChanges()) accept(); + } else accept(); break; case QDialogButtonBox::Apply: applyChanges();