Skip to content

Commit 3010a05

Browse files
FlyViewMap.qml: connect roilocationitem to vehicle roiCoordChanged:
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
1 parent 8d5df9a commit 3010a05

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/FlightDisplay/FlyViewMap.qml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,13 @@ FlightMap {
495495
anchorPoint.x: sourceItem.anchorPointX
496496
anchorPoint.y: sourceItem.anchorPointY
497497

498+
Connections {
499+
target: _activeVehicle
500+
onRoiCoordChanged: {
501+
roiLocationItem.show(centerCoord)
502+
}
503+
}
504+
498505
MouseArea {
499506
anchors.fill: parent
500507
onClicked: {
@@ -638,7 +645,6 @@ FlightMap {
638645
if (popup.opened) {
639646
popup.close()
640647
}
641-
roiLocationItem.show(mapClickCoord)
642648
globals.guidedControllerFlyView.executeAction(globals.guidedControllerFlyView.actionROI, mapClickCoord, 0, false)
643649
}
644650
}

0 commit comments

Comments
 (0)