From 06432c3b0b8a12238c6a79fd1e5535dbb51791ac Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 16 May 2016 18:14:39 +0200 Subject: [PATCH] Make SettingCheckBox properly handle the value --- resources/qml/Settings/SettingCheckBox.qml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/resources/qml/Settings/SettingCheckBox.qml b/resources/qml/Settings/SettingCheckBox.qml index 0acacb95fb..6f0314160e 100644 --- a/resources/qml/Settings/SettingCheckBox.qml +++ b/resources/qml/Settings/SettingCheckBox.qml @@ -19,20 +19,19 @@ SettingItem property bool checked: { - if(value == "True") + switch(propertyProvider.properties.value) { - return true; - } - else if(value == "False") - { - return false; - } - else - { - return value; + case "True": + return true + case "False": + return false + default: + return propertyProvider.properties.value } } + onClicked: propertyProvider.setPropertyValue("value", !checked) + Rectangle { anchors