Skip to content

Commit

Permalink
FlyViewMap.qml: connect roilocationitem to vehicle roiCoordChanged:
Browse files Browse the repository at this point in the history
Instead of setting manually the roilocationitem coordinate in
flyviewmap.qml, we rely instead on the new signal from vehicle.
This way, changes in roi in other parts of the app than map clicks,
like gimbal controls point home, will make the roi indicator appear
  • Loading branch information
Davidsastresas committed Mar 21, 2024
1 parent af98f5d commit a9903e1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/FlightDisplay/FlyViewMap.qml
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,13 @@ FlightMap {
anchorPoint.x: sourceItem.anchorPointX
anchorPoint.y: sourceItem.anchorPointY

Connections {
target: _activeVehicle
onRoiCoordChanged: {
roiLocationItem.show(centerCoord)
}
}

MouseArea {
anchors.fill: parent
onClicked: {
Expand Down Expand Up @@ -638,7 +645,6 @@ FlightMap {
if (popup.opened) {
popup.close()
}
roiLocationItem.show(mapClickCoord)
globals.guidedControllerFlyView.executeAction(globals.guidedControllerFlyView.actionROI, mapClickCoord, 0, false)
}
}
Expand Down

0 comments on commit a9903e1

Please sign in to comment.