From 9db61e11f08ec66f66c08dc0aec389e804e1daa2 Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Wed, 2 May 2018 14:47:55 -0700 Subject: [PATCH] Fix Cancel dialog not going away --- src/AutoPilotPlugins/PX4/SensorsSetup.qml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/AutoPilotPlugins/PX4/SensorsSetup.qml b/src/AutoPilotPlugins/PX4/SensorsSetup.qml index 28bb18b67..673c36a0a 100644 --- a/src/AutoPilotPlugins/PX4/SensorsSetup.qml +++ b/src/AutoPilotPlugins/PX4/SensorsSetup.qml @@ -140,9 +140,7 @@ Item { onWaitingForCancelChanged: { if (controller.waitingForCancel) { - showMessage(qsTr("Calibration Cancel"), qsTr("Waiting for Vehicle to response to Cancel. This may take a few seconds."), 0) - } else { - hideDialog() + showDialog(waitForCancelDialogComponent, qsTr("Calibration Cancel"), qgcView.showDialogDefaultWidth, 0) } } } @@ -154,6 +152,24 @@ Item { } } + Component { + id: waitForCancelDialogComponent + + QGCViewMessage { + message: qsTr("Waiting for Vehicle to response to Cancel. This may take a few seconds.") + + Connections { + target: controller + + onWaitingForCancelChanged: { + if (!controller.waitingForCancel) { + hideDialog() + } + } + } + } + } + Component { id: preCalibrationDialogComponent -- 2.22.0