diff --git a/src/AutoPilotPlugins/APM/APMSensorsComponent.qml b/src/AutoPilotPlugins/APM/APMSensorsComponent.qml index 645fa091ea8d018ca0f81a8ce921160e59ebfdb9..f2f7fe95acb1df3880f06dd385833548af61a5d5 100644 --- a/src/AutoPilotPlugins/APM/APMSensorsComponent.qml +++ b/src/AutoPilotPlugins/APM/APMSensorsComponent.qml @@ -128,9 +128,7 @@ SetupPage { 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) } } @@ -163,6 +161,24 @@ SetupPage { QGCPalette { id: qgcPal; colorGroupEnabled: true } + 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: singleCompassOnboardResultsComponent @@ -265,7 +281,10 @@ SetupPage { QGCButton { text: qsTr("Reboot Vehicle") - onClicked: controller.vehicle.reboot() + onClicked: { + controller.vehicle.rebootVehicle() + hideDialog() + } } } } @@ -290,8 +309,11 @@ SetupPage { QGCButton { text: qsTr("Reboot Vehicle") - onClicked: controller.vehicle.rebootVehicle() - } + onClicked: { + controller.vehicle.rebootVehicle() + hideDialog() + } + } } } }