Commit 64da8d9f authored by Gus Grubba's avatar Gus Grubba

Fixed checked state logic and restore checkedValue and uncheckedValue properties.

parent 9502c20a
......@@ -8,7 +8,8 @@ import QGroundControl.Controls 1.0
QGCCheckBox {
property Fact fact: Fact { }
property variant checkedValue: 1
property variant uncheckedValue: 0
checkedState: fact ?
(fact.typeIsBool ?
(fact.value === false ? Qt.Unchecked : Qt.Checked) :
......@@ -17,5 +18,5 @@ QGCCheckBox {
text: qsTr("Label")
onClicked: fact.value = checked ? 1 : 0
onClicked: fact.value == checked ? checkedValue : uncheckedValue
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment