Commit 2e6ab5dd authored by Don Gagne's avatar Don Gagne

parent a672b841
......@@ -20,6 +20,7 @@ Rectangle {
radius: width / 2
border.color: indicatorColor
color: "transparent"
opacity: 0.75
property color indicatorColor: "white"
......
......@@ -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
}
}
}
......
......@@ -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)
}
}
}
......
......@@ -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()
......
......@@ -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
......
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment