Commit 6173eb61 authored by Gus Grubba's avatar Gus Grubba

Fixed issue where the "Set Circle Radius" menu entry was trying to affect the...

Fixed issue where the "Set Circle Radius" menu entry was trying to affect the visibility of an item within a component.
parent 03d8cf59
...@@ -38,6 +38,7 @@ Item { ...@@ -38,6 +38,7 @@ Item {
property var _centerDragHandleComponent property var _centerDragHandleComponent
property bool _circle: false property bool _circle: false
property real _circleRadius property real _circleRadius
property bool _editCircleRadius: false
property real _zorderDragHandle: QGroundControl.zOrderMapItems + 3 // Highest to prevent splitting when items overlap property real _zorderDragHandle: QGroundControl.zOrderMapItems + 3 // Highest to prevent splitting when items overlap
property real _zorderSplitHandle: QGroundControl.zOrderMapItems + 2 property real _zorderSplitHandle: QGroundControl.zOrderMapItems + 2
...@@ -224,7 +225,7 @@ Item { ...@@ -224,7 +225,7 @@ Item {
MenuItem { MenuItem {
text: qsTr("Set radius..." ) text: qsTr("Set radius..." )
visible: _circle visible: _circle
onTriggered: radiusDialog.visible = true onTriggered: _editCircleRadius = true
} }
MenuItem { MenuItem {
...@@ -460,18 +461,17 @@ Item { ...@@ -460,18 +461,17 @@ Item {
function setRadiusFromDialog() { function setRadiusFromDialog() {
setCircleRadius(mapPolygon.center, radiusField.text) setCircleRadius(mapPolygon.center, radiusField.text)
radiusDialog.visible = false _editCircleRadius = false
} }
Rectangle { Rectangle {
id: radiusDialog
anchors.margins: _margin anchors.margins: _margin
anchors.left: parent.right anchors.left: parent.right
width: radiusColumn.width + (_margin *2) width: radiusColumn.width + (_margin *2)
height: radiusColumn.height + (_margin *2) height: radiusColumn.height + (_margin *2)
color: qgcPal.window color: qgcPal.window
border.color: qgcPal.text border.color: qgcPal.text
visible: false visible: _editCircleRadius
Column { Column {
id: radiusColumn id: radiusColumn
......
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