diff --git a/src/VehicleSetup/JoystickConfig.qml b/src/VehicleSetup/JoystickConfig.qml index 5895ab3fccb6d8aa38682aa1f0ac04625be0fa32..ced3e8aae8141cefcbd083f8382ec8c5899b60d3 100644 --- a/src/VehicleSetup/JoystickConfig.qml +++ b/src/VehicleSetup/JoystickConfig.qml @@ -366,8 +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: _activeVehicle.joystickEnabled onClicked: _activeVehicle.joystickEnabled = checked + Component.onCompleted: checked = _activeVehicle.joystickEnabled + + Connections { + target: _activeVehicle + + onJoystickEnabledChanged: { + enabledCheckBox.checked = _activeVehicle.joystickEnabled + } + } Connections { target: joystickManager