From 2e6dc3ddea483a4ec34b8b839719da1c3402aa3c Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Thu, 22 Mar 2018 18:30:13 -0700 Subject: [PATCH] Not parameter reset for ArduPilot --- src/QmlControls/ParameterEditor.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/QmlControls/ParameterEditor.qml b/src/QmlControls/ParameterEditor.qml index c09e3546e..9fa0fec47 100644 --- a/src/QmlControls/ParameterEditor.qml +++ b/src/QmlControls/ParameterEditor.qml @@ -32,6 +32,7 @@ QGCView { property bool _searchFilter: searchText.text.trim() != "" ///< true: showing results of search property var _searchResults ///< List of parameter names from search results property bool _showRCToParam: !ScreenTools.isMobile && QGroundControl.multiVehicleManager.activeVehicle.px4Firmware + property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle ParameterEditorController { id: controller; @@ -104,6 +105,7 @@ QGCView { } MenuItem { text: qsTr("Reset all to defaults") + visible: !_activeVehicle.apmFirmware onTriggered: showDialog(resetToDefaultConfirmComponent, qsTr("Reset All"), qgcView.showDialogDefaultWidth, StandardButton.Cancel | StandardButton.Reset) } MenuSeparator { } @@ -334,7 +336,7 @@ QGCView { QGCViewDialog { function accept() { - QGroundControl.multiVehicleManager.activeVehicle.rebootVehicle() + _activeVehicle.rebootVehicle() hideDialog() } -- 2.22.0