diff --git a/src/PlanView/PlanView.qml b/src/PlanView/PlanView.qml index dbeef74f350f8912b1ac04588fbe222ac6445d5f..ac0d2adc246f41c1f2e8e935cb25e237879d3b47 100644 --- a/src/PlanView/PlanView.qml +++ b/src/PlanView/PlanView.qml @@ -815,6 +815,17 @@ QGCView { } } + Component { + id: clearVehicleMissionDialog + QGCViewMessage { + message: qsTr("Are you sure you want to remove all mission items and clear the mission from the vehicle?") + function accept() { + masterController.removeAllFromVehicle() + hideDialog() + } + } + } + //- ToolStrip DropPanel Components Component { @@ -995,7 +1006,7 @@ QGCView { visible: !QGroundControl.corePlugin.options.disableVehicleConnection onClicked: { dropPanel.hide() - masterController.removeAllFromVehicle() + _qgcView.showDialog(clearVehicleMissionDialog, text, _qgcView.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel) } }