Explorar el Código

Typo when retrieving a QSettings value

Julien Finet hace 14 años
padre
commit
913944d1fc
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  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())
     {
-    QVariant value = d->Settings->contains(key);
+    QVariant value = d->Settings->value(key);
     if (value.isValid())
       {
       bool res = d->setPropertyValue(d->property(key), value);
       Q_ASSERT(res);
       Q_UNUSED(res);
       }
+    else
+      {
+      this->updateSetting(key);
+      }
     }
 }