From 3b129767d57f5d4ed8b2b87e4913039df95c6559 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Thu, 1 Sep 2016 11:24:53 -0700 Subject: [PATCH] Use 0 for not set --- src/AutoPilotPlugins/PX4/SafetyComponent.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/AutoPilotPlugins/PX4/SafetyComponent.qml b/src/AutoPilotPlugins/PX4/SafetyComponent.qml index a5c334833..6532da76a 100644 --- a/src/AutoPilotPlugins/PX4/SafetyComponent.qml +++ b/src/AutoPilotPlugins/PX4/SafetyComponent.qml @@ -313,8 +313,8 @@ SetupPage { id: fenceRadiusCheckBox anchors.baseline: fenceRadiusField.baseline text: qsTr("Max radius:") - checked: _fenceRadius.value >= 0 - onClicked: _fenceRadius.value = checked ? 100 : -1 + checked: _fenceRadius.value > 0 + onClicked: _fenceRadius.value = checked ? 100 : 0 width: _middleRowWidth } FactTextField { @@ -330,8 +330,8 @@ SetupPage { id: fenceAltMaxCheckBox anchors.baseline: fenceAltMaxField.baseline text: qsTr("Max altitude:") - checked: _fenceAlt.value >= 0 - onClicked: _fenceAlt.value = checked ? 100 : -1 + checked: _fenceAlt.value > 0 + onClicked: _fenceAlt.value = checked ? 100 : 0 width: _middleRowWidth } FactTextField { -- 2.22.0