Browse Source

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

QGC4.4
Gus Grubba 7 years ago
parent
commit
70fced38ef
  1. 13
      src/PlanView/PlanView.qml

13
src/PlanView/PlanView.qml

@ -815,6 +815,17 @@ QGCView { @@ -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 { @@ -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)
}
}

Loading…
Cancel
Save