diff --git a/src/QmlControls/ParameterEditor.qml b/src/QmlControls/ParameterEditor.qml index c09e3546efa3aca8ea9a11f4a00057bb5a206c17..9fa0fec47affc77b0d4e8c7546d344601b264cf3 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() }