From 15ef8c0e34723b367c8da5d11e0cd6d62eb98785 Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Mon, 22 Apr 2019 23:03:52 -0300 Subject: [PATCH] Explicitly invoke setup page complete when needed --- src/AutoPilotPlugins/Common/RadioComponent.qml | 2 +- src/AutoPilotPlugins/Common/SetupPage.qml | 5 +++-- src/VehicleSetup/FirmwareUpgrade.qml | 4 +--- src/VehicleSetup/JoystickConfig.qml | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/AutoPilotPlugins/Common/RadioComponent.qml b/src/AutoPilotPlugins/Common/RadioComponent.qml index 278d122d9..46cf29b04 100644 --- a/src/AutoPilotPlugins/Common/RadioComponent.qml +++ b/src/AutoPilotPlugins/Common/RadioComponent.qml @@ -33,7 +33,7 @@ SetupPage { readonly property string dialogTitle: qsTr("Radio") - onSetupPageCompleted: { + function setupPageCompleted() { controller.start() updateChannelCount() } diff --git a/src/AutoPilotPlugins/Common/SetupPage.qml b/src/AutoPilotPlugins/Common/SetupPage.qml index db50bf25b..b9ce89871 100644 --- a/src/AutoPilotPlugins/Common/SetupPage.qml +++ b/src/AutoPilotPlugins/Common/SetupPage.qml @@ -32,7 +32,6 @@ Item { property real availableHeight: height - pageLoader.y property bool showAdvanced: false property alias advanced: advancedCheckBox.checked - property bool setupPageCompleted: false property bool _vehicleIsRover: activeVehicle ? activeVehicle.rover : false property bool _vehicleArmed: activeVehicle ? activeVehicle.armed : false @@ -45,7 +44,9 @@ Item { property string _pageTitle: qsTr("%1 Setup").arg(pageName) Component.onCompleted: { - setupPageCompleted = true + if(pageLoader.item && pageLoader.item.setupPageCompleted) { + pageLoader.item.setupPageCompleted() + } } QGCFlickable { diff --git a/src/VehicleSetup/FirmwareUpgrade.qml b/src/VehicleSetup/FirmwareUpgrade.qml index 0b671737d..025cdd155 100644 --- a/src/VehicleSetup/FirmwareUpgrade.qml +++ b/src/VehicleSetup/FirmwareUpgrade.qml @@ -73,9 +73,7 @@ SetupPage { controller.cancel() } - QGCPalette { id: qgcPal; colorGroupEnabled: true } - - onSetupPageCompleted: { + function setupPageCompleted() { controller.startBoardSearch() _defaultFirmwareIsPX4 = _defaultFirmwareFact.rawValue === _defaultFimwareTypePX4 // we don't want this to be bound and change as radios are selected } diff --git a/src/VehicleSetup/JoystickConfig.qml b/src/VehicleSetup/JoystickConfig.qml index 6d19b594b..a981d501b 100644 --- a/src/VehicleSetup/JoystickConfig.qml +++ b/src/VehicleSetup/JoystickConfig.qml @@ -50,7 +50,7 @@ SetupPage { property var _activeJoystick: joystickManager.activeJoystick - onSetupPageCompleted: { + function setupPageCompleted() { controller.start() } -- 2.22.0