From c40fc59e67faf088b65e312e23784e1c9f279559 Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Sun, 9 Dec 2018 20:19:55 -0400 Subject: [PATCH] Handle warnings --- src/FlightDisplay/FlightDisplayViewMap.qml | 4 ++-- src/MissionManager/QGCMapCircleVisuals.qml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/FlightDisplay/FlightDisplayViewMap.qml b/src/FlightDisplay/FlightDisplayViewMap.qml index de45dcc04e..bef117d3ac 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 e650924069..e5946c88b0 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) { -- GitLab