Make SettingCheckBox properly handle the value

This commit is contained in:
Arjen Hiemstra 2016-05-16 18:14:39 +02:00
parent 5b31634d3c
commit 06432c3b0b

View File

@ -19,20 +19,19 @@ SettingItem
property bool checked: property bool checked:
{ {
if(value == "True") switch(propertyProvider.properties.value)
{ {
return true; case "True":
} return true
else if(value == "False") case "False":
{ return false
return false; default:
} return propertyProvider.properties.value
else
{
return value;
} }
} }
onClicked: propertyProvider.setPropertyValue("value", !checked)
Rectangle Rectangle
{ {
anchors anchors