diff --git a/src/AutoPilotPlugins/PX4/SensorsSetup.qml b/src/AutoPilotPlugins/PX4/SensorsSetup.qml index 28bb18b676f0434fe6b2de835f8ace5b208a602c..673c36a0a8368a44efc30ba907f7364232a13ff5 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