Commit 70fced38 authored by Gus Grubba's avatar Gus Grubba

Add a dialog asking the user for confirmation before removing all items and clearing the vehicle.

parent c15683a5
......@@ -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)
}
}
......
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