diff --git a/src/FlightDisplay/FlightDisplayViewMap.qml b/src/FlightDisplay/FlightDisplayViewMap.qml index de45dcc04eba665b60d19c1fcae38abea6689a1b..bef117d3ac09dd7a74e9d9022c7627e150c4ab9f 100644 --- a/src/FlightDisplay/FlightDisplayViewMap.qml +++ b/src/FlightDisplay/FlightDisplayViewMap.qml @@ -357,7 +357,7 @@ FlightMap { // Used to show orbit status telemetry from the vehicle QGCMapCircleVisuals { mapControl: parent - mapCircle: _activeVehicle.orbitMapCircle + mapCircle: _activeVehicle ? _activeVehicle.orbitMapCircle : null visible: _activeVehicle ? _activeVehicle.orbitActive : false } @@ -396,7 +396,7 @@ FlightMap { onClicked: { if (guidedActionsController.guidedUIVisible || (!guidedActionsController.showGotoLocation && !guidedActionsController.showOrbit)) { return - } + } orbitMapCircle.hide() gotoLocationItem.hide() var clickCoord = flightMap.toCoordinate(Qt.point(mouse.x, mouse.y), false /* clipToViewPort */) diff --git a/src/MissionManager/QGCMapCircleVisuals.qml b/src/MissionManager/QGCMapCircleVisuals.qml index e650924069b33da99ed7af315cfd9450c1468890..e5946c88b05d271b803cedbb4c498ea34134794e 100644 --- a/src/MissionManager/QGCMapCircleVisuals.qml +++ b/src/MissionManager/QGCMapCircleVisuals.qml @@ -22,9 +22,9 @@ import QGroundControl.FlightMap 1.0 Item { id: _root - property var mapControl ///< Map control to place item in - property var mapCircle ///< QGCMapCircle object - property bool interactive: mapCircle.interactive /// true: user can manipulate polygon + property var mapControl ///< Map control to place item in + property var mapCircle ///< QGCMapCircle object + property bool interactive: mapCircle ? mapCircle.interactive : 0 /// true: user can manipulate polygon property color interiorColor: "transparent" property real interiorOpacity: 1 property int borderWidth: 2 @@ -34,7 +34,7 @@ Item { property var _topRotationIndicatorComponent property var _bottomRotationIndicatorComponent property var _dragHandlesComponent - property real _radius: mapCircle.radius.rawValue + property real _radius: mapCircle ? mapCircle.radius.rawValue : 0 function addVisuals() { if (!_circleComponent) {