Commit 52c71413 authored by Don Gagne's avatar Don Gagne

More work on mission end dialog

parent d67b1830
...@@ -148,7 +148,10 @@ QGCView { ...@@ -148,7 +148,10 @@ QGCView {
} }
} else { } else {
if (promptForMissionRemove && (_missionController.containsItems || _geoFenceController.containsItems || _rallyPointController.containsItems)) { 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 promptForMissionRemove = false
} }
...@@ -168,7 +171,7 @@ QGCView { ...@@ -168,7 +171,7 @@ QGCView {
anchors.fill: parent anchors.fill: parent
contentHeight: column.height contentHeight: column.height
Column { ColumnLayout {
id: column id: column
anchors.margins: _margins anchors.margins: _margins
anchors.left: parent.left anchors.left: parent.left
...@@ -176,19 +179,27 @@ QGCView { ...@@ -176,19 +179,27 @@ QGCView {
spacing: ScreenTools.defaultFontPixelHeight spacing: ScreenTools.defaultFontPixelHeight
QGCLabel { QGCLabel {
text: qsTr("%1 Images Taken").arg(_activeVehicle.cameraTriggerPoints.count) Layout.fillWidth: true
anchors.horizontalCenter: parent.horizontalCenter text: qsTr("%1 Images Taken").arg(_activeVehicle.cameraTriggerPoints.count)
visible: _activeVehicle.cameraTriggerPoints.count != 0 horizontalAlignment: Text.AlignHCenter
visible: _activeVehicle.cameraTriggerPoints.count != 0
} }
QGCButton { QGCButton {
text: qsTr("Remove plan from vehicle") Layout.fillWidth: true
anchors.horizontalCenter: parent.horizontalCenter text: qsTr("Remove plan from vehicle")
onClicked: { onClicked: {
_planMasterController.removeAllFromVehicle() _planMasterController.removeAllFromVehicle()
hideDialog() hideDialog()
} }
} }
QGCButton {
Layout.fillWidth: true
text: qsTr("Leave plan on vehicle")
anchors.horizontalCenter: parent.horizontalCenter
onClicked: hideDialog()
}
} }
} }
} }
......
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