From 24481c888556900e0a4c7328f7b2e3219af9153e Mon Sep 17 00:00:00 2001 From: davidsastresas Date: Tue, 19 Mar 2024 02:59:33 +0100 Subject: [PATCH] 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 --- src/FlightDisplay/FlyViewMap.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/FlightDisplay/FlyViewMap.qml b/src/FlightDisplay/FlyViewMap.qml index d2bd159..84edee9 100644 --- a/src/FlightDisplay/FlyViewMap.qml +++ b/src/FlightDisplay/FlyViewMap.qml @@ -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: { @@ -638,7 +645,6 @@ FlightMap { if (popup.opened) { popup.close() } - roiLocationItem.show(mapClickCoord) globals.guidedControllerFlyView.executeAction(globals.guidedControllerFlyView.actionROI, mapClickCoord, 0, false) } }