Commit c27e172d authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #5102 from DonLakeFlyer/GuidedCloseAll

Fly-Guided: Fixed support for closing all guided dialogs
parents c9bd4917 10954660
......@@ -482,11 +482,7 @@ QGCView {
]
onClicked: {
//-- Dismiss any other dialog
rootLoader.sourceComponent = null
guidedActionConfirm.visible = false
guidedActionList.visible = false
altitudeSlider.visible = false
guidedActionsController.closeAll()
var action = model[index].action
if (action === -1) {
if (index == 4) {
......@@ -531,6 +527,14 @@ QGCView {
confirmAction(actionLandAbort)
}
}
/// Close all dialogs
function closeAll() {
rootLoader.sourceComponent = null
guidedActionConfirm.visible = false
guidedActionList.visible = false
altitudeSlider.visible = false
}
}
GuidedActionConfirm {
......
......@@ -123,6 +123,7 @@ Item {
// Called when an action is about to be executed in order to confirm
function confirmAction(actionCode, actionData) {
closeAll()
confirmDialog.action = actionCode
confirmDialog.actionData = actionData
_actionData = actionData
......
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