Przeglądaj źródła

ctkSettingsDialog now clears settings...

...when clicking on the "restore default" button
Julien Finet 14 lat temu
rodzic
commit
5ff014d09d
1 zmienionych plików z 7 dodań i 0 usunięć
  1. 7 0
      Libs/Widgets/ctkSettingsDialog.cpp

+ 7 - 0
Libs/Widgets/ctkSettingsDialog.cpp

@@ -249,6 +249,13 @@ void ctkSettingsDialog::resetSettings()
 void ctkSettingsDialog::restoreDefaultSettings()
 {
   Q_D(ctkSettingsDialog);
+  // The panels may not contain ALL the settings of the application,
+  // for the ones we don't default value, the best is to clear all of them...
+  if (d->Settings)
+    {
+    d->Settings->clear();
+    }
+  // ... and restore settings for the ones we can
   foreach(ctkSettingsPanel* panel, d->Panels.values())
     {
     panel->restoreDefaultSettings();