From 73fabad154c40118eab0bb3160e4e6474d38fdf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20P=C3=A9rez=20Alonso?= Date: Mon, 16 Dec 2024 11:45:13 +0100 Subject: [PATCH] Make preflight checklist manual buttons toggleable Made it possible to set manual checklist buttons back to the pending state, so that in case of an accidental click, the check can be undone without resetting the entire checklist and having to go through it again. --- src/QmlControls/PreFlightCheckButton.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/QmlControls/PreFlightCheckButton.qml b/src/QmlControls/PreFlightCheckButton.qml index 056d412dcef..9be111ef773 100644 --- a/src/QmlControls/PreFlightCheckButton.qml +++ b/src/QmlControls/PreFlightCheckButton.qml @@ -107,9 +107,9 @@ QGCButton { _telemetryState = _statePassed return } - if (manualText !== "" && _manualState !== _statePassed) { + if (manualText !== "") { // User is confirming a manual check - _manualState = _statePassed + _manualState = (_manualState === _statePassed) ? _statePending : _statePassed } }