From 57f0cf4a2dd66499a13475829eb88b9635c01f9a Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Fri, 1 Dec 2017 07:03:15 -0500 Subject: [PATCH] Added a signal handler to force toggle the switch. Not sure why the normal signal is not being respected. --- src/FlightMap/Widgets/VideoPageWidget.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/FlightMap/Widgets/VideoPageWidget.qml b/src/FlightMap/Widgets/VideoPageWidget.qml index a0046ddfd..10d0e6503 100644 --- a/src/FlightMap/Widgets/VideoPageWidget.qml +++ b/src/FlightMap/Widgets/VideoPageWidget.qml @@ -45,12 +45,20 @@ Item { columnSpacing: ScreenTools.defaultFontPixelWidth * 2 rowSpacing: ScreenTools.defaultFontPixelHeight anchors.centerIn: parent + Connections { + // For some reason, the normal signal is not reflected in the control below + target: QGroundControl.settingsManager.videoSettings.streamEnabled + onRawValueChanged: { + enableSwitch.checked = QGroundControl.settingsManager.videoSettings.streamEnabled.rawValue + } + } // Enable/Disable Video Streaming QGCLabel { text: qsTr("Enable Stream") font.pointSize: ScreenTools.smallFontPointSize } QGCSwitch { + id: enableSwitch enabled: _streamingEnabled checked: QGroundControl.settingsManager.videoSettings.streamEnabled.rawValue onClicked: { -- 2.22.0