Query buffers are now automatically renamed on nickchanges.
[quassel.git] / src / qtui / settingspagedlg.cpp
index 7d36cf5..2c817a9 100644 (file)
@@ -44,7 +44,6 @@ SettingsPage *SettingsPageDlg::currentPage() const {
 
 void SettingsPageDlg::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());
@@ -53,7 +52,9 @@ void SettingsPageDlg::setButtonStates() {
 void SettingsPageDlg::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();