Commit faaa44d9 authored by nanthony21's avatar nanthony21

Fixed an apparent bug that prevented the checkbox from accurately

representing the active state of the joystick after calibration
parent de17dbb1
......@@ -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
......
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