From 52c71413b3bd129f97fcc2e70f06f50a2d004553 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Tue, 13 Jun 2017 18:35:17 -0700 Subject: [PATCH] More work on mission end dialog --- src/FlightDisplay/FlightDisplayView.qml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/FlightDisplay/FlightDisplayView.qml b/src/FlightDisplay/FlightDisplayView.qml index dac62fee0..41668ee91 100644 --- a/src/FlightDisplay/FlightDisplayView.qml +++ b/src/FlightDisplay/FlightDisplayView.qml @@ -148,7 +148,10 @@ QGCView { } } else { if (promptForMissionRemove && (_missionController.containsItems || _geoFenceController.containsItems || _rallyPointController.containsItems)) { - root.showDialog(missionCompleteDialogComponent, qsTr("Flight Plan complete"), showDialogDefaultWidth, StandardButton.Close) + // ArduPilot has a strange bug which prevents mission clear from working at certain times, so we can't show this dialog + if (!_activeVehicle.apmFirmware) { + root.showDialog(missionCompleteDialogComponent, qsTr("Flight Plan complete"), showDialogDefaultWidth, StandardButton.Close) + } } promptForMissionRemove = false } @@ -168,7 +171,7 @@ QGCView { anchors.fill: parent contentHeight: column.height - Column { + ColumnLayout { id: column anchors.margins: _margins anchors.left: parent.left @@ -176,19 +179,27 @@ QGCView { spacing: ScreenTools.defaultFontPixelHeight QGCLabel { - text: qsTr("%1 Images Taken").arg(_activeVehicle.cameraTriggerPoints.count) - anchors.horizontalCenter: parent.horizontalCenter - visible: _activeVehicle.cameraTriggerPoints.count != 0 + Layout.fillWidth: true + text: qsTr("%1 Images Taken").arg(_activeVehicle.cameraTriggerPoints.count) + horizontalAlignment: Text.AlignHCenter + visible: _activeVehicle.cameraTriggerPoints.count != 0 } QGCButton { - text: qsTr("Remove plan from vehicle") - anchors.horizontalCenter: parent.horizontalCenter + Layout.fillWidth: true + text: qsTr("Remove plan from vehicle") onClicked: { _planMasterController.removeAllFromVehicle() hideDialog() } } + + QGCButton { + Layout.fillWidth: true + text: qsTr("Leave plan on vehicle") + anchors.horizontalCenter: parent.horizontalCenter + onClicked: hideDialog() + } } } } -- 2.22.0