From d2ddc80013ecea88bf278c3cd3ee534e4a250c2e Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Tue, 4 Aug 2015 13:19:20 +0200 Subject: [PATCH] Fix QML corner cases, simplify instructions, add need to manually re-connect --- src/AutoPilotPlugins/PX4/AirframeComponent.qml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/AutoPilotPlugins/PX4/AirframeComponent.qml b/src/AutoPilotPlugins/PX4/AirframeComponent.qml index 2d1600e24..00be126a3 100644 --- a/src/AutoPilotPlugins/PX4/AirframeComponent.qml +++ b/src/AutoPilotPlugins/PX4/AirframeComponent.qml @@ -111,7 +111,7 @@ QGCView { QGCLabel { anchors.top: headingSpacer.bottom width: parent.width - applyButton.width - 5 - text: "Select your airframe type and specific vehicle bellow. Click 'Apply and Restart' when ready and your vehicle will be disconnected, rebooted to the new settings and re-connected." + text: "Please select your airframe type. Click 'Apply and Restart' to reboot the autopilot. Please re-connect then manually." wrapMode: Text.WordWrap } @@ -221,11 +221,14 @@ QGCView { anchors.top: image.bottom width: parent.width - (innerMargin * 2) model: modelData.airframes - currentIndex: (modelData.name == controller.currentAirframeType) ? controller.currentVehicleIndex : 0 + currentIndex: (modelData.name == controller.currentAirframeType) ? controller.currentVehicleIndex : -1 onActivated: { - controller.autostartId = modelData.airframes[currentIndex].autostartId - airframeCheckBox.checked = true; + if (index != -1) { + currentIndex = index + controller.autostartId = modelData.airframes[index].autostartId + airframeCheckBox.checked = true; + } } } } -- 2.22.0