Unverified Commit b9247f0e authored by Gus Grubba's avatar Gus Grubba Committed by GitHub

Merge pull request #6376 from mavlink/factCheckBoxFix

Fixed checked state logic 
parents 9502c20a 64da8d9f
......@@ -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