From cb69cc82544698c57b217d5c5d3d67c5cf541e72 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Sat, 3 Jun 2017 21:09:39 -0700 Subject: [PATCH] Remove mission dialog shows image count --- src/FlightDisplay/FlightDisplayView.qml | 35 ++++++++++++++++++++----- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/src/FlightDisplay/FlightDisplayView.qml b/src/FlightDisplay/FlightDisplayView.qml index b0cbf5fdc..f740e10e9 100644 --- a/src/FlightDisplay/FlightDisplayView.qml +++ b/src/FlightDisplay/FlightDisplayView.qml @@ -148,7 +148,7 @@ QGCView { } } else { if (promptForMissionRemove && (_missionController.containsItems || _geoFenceController.containsItems || _rallyPointController.containsItems)) { - root.showDialog(removeMissionDialogComponent, qsTr("Flight complete"), showDialogDefaultWidth, StandardButton.No | StandardButton.Yes) + root.showDialog(missionCompleteDialogComponent, qsTr("Flight Plan complete"), showDialogDefaultWidth, StandardButton.Close) } promptForMissionRemove = false } @@ -161,14 +161,35 @@ QGCView { } Component { - id: removeMissionDialogComponent + id: missionCompleteDialogComponent - QGCViewMessage { - message: qsTr("Do you want to remove the mission from the vehicle?") + QGCViewDialog { + QGCFlickable { + anchors.fill: parent + contentHeight: column.height + + Column { + id: column + anchors.margins: _margins + anchors.left: parent.left + anchors.right: parent.right + spacing: ScreenTools.defaultFontPixelHeight + + QGCLabel { + text: qsTr("%1 Images Taken").arg(_activeVehicle.cameraTriggerPoints.count) + anchors.horizontalCenter: parent.horizontalCenter + visible: _activeVehicle.cameraTriggerPoints.count != 0 + } - function accept() { - _planMasterController.removeAllFromVehicle() - hideDialog() + QGCButton { + text: qsTr("Remove plan from vehicle") + anchors.horizontalCenter: parent.horizontalCenter + onClicked: { + _planMasterController.removeAllFromVehicle() + hideDialog() + } + } + } } } } -- 2.22.0