Ver código fonte

Typo when retrieving a QSettings value

Julien Finet 14 anos atrás
pai
commit
913944d1fc
1 arquivos alterados com 5 adições e 1 exclusões
  1. 5 1
      Libs/Widgets/ctkSettingsPanel.cpp

+ 5 - 1
Libs/Widgets/ctkSettingsPanel.cpp

@@ -141,13 +141,17 @@ void ctkSettingsPanel::updateProperties()
     }
     }
   foreach(const QString& key, d->Properties.keys())
   foreach(const QString& key, d->Properties.keys())
     {
     {
-    QVariant value = d->Settings->contains(key);
+    QVariant value = d->Settings->value(key);
     if (value.isValid())
     if (value.isValid())
       {
       {
       bool res = d->setPropertyValue(d->property(key), value);
       bool res = d->setPropertyValue(d->property(key), value);
       Q_ASSERT(res);
       Q_ASSERT(res);
       Q_UNUSED(res);
       Q_UNUSED(res);
       }
       }
+    else
+      {
+      this->updateSetting(key);
+      }
     }
     }
 }
 }