Browse Source

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
QGC4.4
davidsastresas 11 months ago committed by Julian Oes
parent
commit
24481c8885
No known key found for this signature in database
GPG Key ID: F0ED380FEA56DE41
  1. 8
      src/FlightDisplay/FlyViewMap.qml

8
src/FlightDisplay/FlyViewMap.qml

@ -495,6 +495,13 @@ FlightMap {
anchorPoint.x: sourceItem.anchorPointX anchorPoint.x: sourceItem.anchorPointX
anchorPoint.y: sourceItem.anchorPointY anchorPoint.y: sourceItem.anchorPointY
Connections {
target: _activeVehicle
onRoiCoordChanged: {
roiLocationItem.show(centerCoord)
}
}
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: { onClicked: {
@ -638,7 +645,6 @@ FlightMap {
if (popup.opened) { if (popup.opened) {
popup.close() popup.close()
} }
roiLocationItem.show(mapClickCoord)
globals.guidedControllerFlyView.executeAction(globals.guidedControllerFlyView.actionROI, mapClickCoord, 0, false) globals.guidedControllerFlyView.executeAction(globals.guidedControllerFlyView.actionROI, mapClickCoord, 0, false)
} }
} }

Loading…
Cancel
Save