From 27f61a757777b775d007565d4c53f177eb29702d Mon Sep 17 00:00:00 2001 From: Nick Anthony Date: Tue, 6 Feb 2018 13:24:58 -0600 Subject: [PATCH] Implemented workaround for bug with qml property binding. Now the state of the checkbox will always match up with the state of the outputEnabled. --- src/VehicleSetup/JoystickConfig.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/VehicleSetup/JoystickConfig.qml b/src/VehicleSetup/JoystickConfig.qml index 3826d94d7..df9a8d22c 100644 --- a/src/VehicleSetup/JoystickConfig.qml +++ b/src/VehicleSetup/JoystickConfig.qml @@ -366,10 +366,16 @@ SetupPage { id: enabledCheckBox enabled: _activeJoystick ? _activeJoystick.calibrated : false text: _activeJoystick ? _activeJoystick.calibrated ? qsTr("Enable joystick input") : qsTr("Enable not allowed (Calibrate First)") : "" - checked: _activeJoystick.outputEnabled onClicked: _activeJoystick.outputEnabled = checked + Connections { + target: _activeJoystick + onOutputEnabledChanged: { + enabledCheckBox.checked=enabled + } + } + Connections { target: joystickManager -- 2.22.0