Skip to content

Commit 9ea3d0e

Browse files
committed
Fix radius reset when editing FW Landing Patterns
Resolved an issue where the loiter radius of a fixed-wing Landing Pattern would revert back to its default value when starting to edit the mission item.
1 parent dda33d4 commit 9ea3d0e

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/PlanView/FWLandingPatternEditor.qml

+3-7
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Rectangle {
4141
property string _setToVehicleLocationStr: qsTr("Set to vehicle location")
4242
property bool _showCameraSection: !_missionVehicle.apmFirmware
4343
property int _altitudeMode: missionItem.altitudesAreRelative ? QGroundControl.AltitudeModeRelative : QGroundControl.AltitudeModeAbsolute
44-
property real _previousLoiterRadius: 0
44+
property real _previousLoiterRadius: missionItem.loiterRadius.rawValue
4545

4646
Column {
4747
id: editorColumn
@@ -74,12 +74,8 @@ Rectangle {
7474
// glide slope heading correctly
7575
onCheckedChanged: {
7676
if (checked) {
77-
// Restore the previous loiter radius or set the default value
78-
if (_previousLoiterRadius > 0) {
79-
missionItem.loiterRadius.rawValue = _previousLoiterRadius
80-
} else {
81-
missionItem.loiterRadius.rawValue = missionItem.loiterRadius.defaultValue
82-
}
77+
// Restore the previous loiter radius
78+
missionItem.loiterRadius.rawValue = _previousLoiterRadius
8379
} else {
8480
_previousLoiterRadius = missionItem.loiterRadius.rawValue
8581
missionItem.loiterRadius.rawValue = 0

0 commit comments

Comments
 (0)