diff --git a/src/FlightMap/MapItems/SplitIndicator.qml b/src/FlightMap/MapItems/SplitIndicator.qml index a09461794e7a6d2eab42947a049a1135fe090500..a31748243df0a601eddbe1f712c008ab24f712c3 100644 --- a/src/FlightMap/MapItems/SplitIndicator.qml +++ b/src/FlightMap/MapItems/SplitIndicator.qml @@ -20,6 +20,7 @@ Rectangle { radius: width / 2 border.color: indicatorColor color: "transparent" + opacity: 0.75 property color indicatorColor: "white" diff --git a/src/MissionManager/QGCMapPolygonVisuals.qml b/src/MissionManager/QGCMapPolygonVisuals.qml index 6355eec98db4ad6cbf486b4140c3b6f5da8a308b..898d146fceaabf23152b7a7bd4fe652018408a22 100644 --- a/src/MissionManager/QGCMapPolygonVisuals.qml +++ b/src/MissionManager/QGCMapPolygonVisuals.qml @@ -267,32 +267,14 @@ Item { MapQuickItem { id: mapQuickItem - anchorPoint.x: dragHandle.width / 2 - anchorPoint.y: dragHandle.height / 2 + anchorPoint.x: sourceItem.width / 2 + anchorPoint.y: sourceItem.height / 2 visible: !_circle property int vertexIndex - sourceItem: Rectangle { - id: dragHandle - width: ScreenTools.defaultFontPixelHeight * 1.5 - height: width - radius: width / 2 - border.color: "white" - color: "transparent" - opacity: .50 - z: _zorderSplitHandle - - QGCLabel { - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - text: "+" - } - - QGCMouseArea { - fillItem: parent - onClicked: mapPolygon.splitPolygonSegment(mapQuickItem.vertexIndex) - } + sourceItem: SplitIndicator { + z: _zorderSplitHandle } } } diff --git a/src/MissionManager/QGCMapPolylineVisuals.qml b/src/MissionManager/QGCMapPolylineVisuals.qml index 2fa3993024fdd60e6a91d99e17706992200ec408..57010c1982e53d546a8260292861476d89ede8e1 100644 --- a/src/MissionManager/QGCMapPolylineVisuals.qml +++ b/src/MissionManager/QGCMapPolylineVisuals.qml @@ -98,8 +98,6 @@ Item { } } - onVisibleChanged: _polylineComponent.visible = visible - Component.onCompleted: { addVisuals() if (interactive) { @@ -175,6 +173,7 @@ Item { line.width: lineWidth line.color: lineColor path: mapPolyline.path + visible: _root.visible } } @@ -183,31 +182,14 @@ Item { MapQuickItem { id: mapQuickItem - anchorPoint.x: splitHandle.width / 2 - anchorPoint.y: splitHandle.height / 2 + anchorPoint.x: sourceItem.width / 2 + anchorPoint.y: sourceItem.height / 2 + z: _zorderSplitHandle property int vertexIndex - sourceItem: Rectangle { - id: splitHandle - width: ScreenTools.defaultFontPixelHeight * 1.5 - height: width - radius: width / 2 - border.color: "white" - color: "transparent" - opacity: .50 - z: _zorderSplitHandle - - QGCLabel { - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - text: "+" - } - - QGCMouseArea { - fillItem: parent - onClicked: mapPolyline.splitSegment(mapQuickItem.vertexIndex) - } + sourceItem: SplitIndicator { + onClicked: mapPolyline.splitSegment(mapQuickItem.vertexIndex) } } } diff --git a/src/PlanView/CorridorScanMapVisual.qml b/src/PlanView/CorridorScanMapVisual.qml index d674a61d5f2af79e3b79841f338404525c529056..22a98a08cfcae95f5cd29295741d4b7f5648dcee 100644 --- a/src/PlanView/CorridorScanMapVisual.qml +++ b/src/PlanView/CorridorScanMapVisual.qml @@ -17,7 +17,9 @@ import QGroundControl.Controls 1.0 /// Corridor Scan Complex Mission Item visuals TransectStyleMapVisuals { - property bool _currentItem: object.isCurrentItem + polygonInteractive: false + + property bool _currentItem: object.isCurrentItem Component.onCompleted: mapPolylineVisuals.addInitialPolyline() diff --git a/src/PlanView/SurveyMapVisual.qml b/src/PlanView/SurveyMapVisual.qml index ec4e4cbe5b3d0cd95e1ce9d1da551e7e0be10801..6315223c4e2cee07296d014fcc8803d2bbe3c743 100644 --- a/src/PlanView/SurveyMapVisual.qml +++ b/src/PlanView/SurveyMapVisual.qml @@ -20,6 +20,8 @@ import QGroundControl.FlightMap 1.0 /// Survey Complex Mission Item visuals TransectStyleMapVisuals { + polygonInteractive: true + property var _mapPolygon: object.surveyAreaPolygon /// Add an initial 4 sided polygon if there is none diff --git a/src/PlanView/TransectStyleMapVisuals.qml b/src/PlanView/TransectStyleMapVisuals.qml index daee2fdf2ebb67ad8e8f45890957ef9b3e112e41..fe85176c00ba12d595ea1a1c387c1333d99c3d53 100644 --- a/src/PlanView/TransectStyleMapVisuals.qml +++ b/src/PlanView/TransectStyleMapVisuals.qml @@ -22,7 +22,8 @@ import QGroundControl.FlightMap 1.0 Item { id: _root - property var map ///< Map control to place item in + property var map ///< Map control to place item in + property bool polygonInteractive: true property var _missionItem: object property var _mapPolygon: object.surveyAreaPolygon @@ -69,7 +70,7 @@ Item { id: mapPolygonVisuals mapControl: map mapPolygon: _mapPolygon - interactive: _missionItem.isCurrentItem + interactive: polygonInteractive && _missionItem.isCurrentItem borderWidth: 1 borderColor: "black" interiorColor: "green"