From 583e30ab492b63d7626d3924dab3d5e3ee5c647f Mon Sep 17 00:00:00 2001 From: consti10 Date: Tue, 21 Nov 2023 16:37:06 +0100 Subject: [PATCH] persist connection mode --- qml/ui/configpopup/connect/PaneConnectionMode.qml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qml/ui/configpopup/connect/PaneConnectionMode.qml b/qml/ui/configpopup/connect/PaneConnectionMode.qml index efccc7b05..0d4920b92 100644 --- a/qml/ui/configpopup/connect/PaneConnectionMode.qml +++ b/qml/ui/configpopup/connect/PaneConnectionMode.qml @@ -76,9 +76,12 @@ Rectangle{ ListElement { text: "MANUAL UDP" } ListElement { text: "MANUAL TCP" } } - onCurrentIndexChanged: { + onActivated: { if(currentIndex==0 || currentIndex==1 || currentIndex==2){ - _mavlinkTelemetry.change_telemetry_connection_mode(currentIndex); + if(settings.qopenhd_mavlink_connection_mode!=currentIndex){ + _mavlinkTelemetry.change_telemetry_connection_mode(currentIndex); + settings.qopenhd_mavlink_connection_mode=currentIndex; + } } } currentIndex: settings.qopenhd_mavlink_connection_mode