Skip to content

Commit

Permalink
Fix disappearing loiter circles
Browse files Browse the repository at this point in the history
When video streaming was enabled, toggling between mini
video and full screen video mode would make the circles
representing loiter circles on the flight path disappear. This
fixes that issue.
  • Loading branch information
gillamkid authored and DonLakeFlyer committed Oct 28, 2024
1 parent 8202e60 commit 982da35
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/PlanView/SimpleItemMapVisual.qml
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,11 @@ Item {
target: _missionItem.isSimpleItem ? _missionItem : null

onLoiterRadiusChanged: {
_loiterVisual.blockSignals = true
_loiterVisual.clockwiseRotation = _missionItem.loiterRadius>= 0
_loiterVisual.blockSignals = false
_loiterVisual.radius.rawValue = Math.abs(_missionItem.loiterRadius)
_loiterVisual.handleLoiterRadiusChange()
}

onCoordinateChanged: {
_loiterVisual.coordinate = _missionItem.coordinate
_loiterVisual.handleCoordinateChange()
}
}

Expand Down Expand Up @@ -147,6 +144,17 @@ Item {
property alias radius: _mapCircle.radius
property alias clockwiseRotation: _mapCircle.clockwiseRotation

function handleLoiterRadiusChange() {
blockSignals = true
clockwiseRotation = _missionItem.loiterRadius>= 0
blockSignals = false
radius.rawValue = Math.abs(_missionItem.loiterRadius)
}

function handleCoordinateChange() {
coordinate = _missionItem.coordinate
}

onCoordinateChanged: _mapCircle.center = coordinate

sourceItem: QGCMapCircleVisuals {
Expand Down Expand Up @@ -177,6 +185,11 @@ Item {
}
}
}

Component.onCompleted: {
handleLoiterRadiusChange()
handleCoordinateChange()
}
}
}
}

0 comments on commit 982da35

Please sign in to comment.