diff --git a/src/MissionManager/QGCMapPolygonVisuals.qml b/src/MissionManager/QGCMapPolygonVisuals.qml index ae559317d27701a14a5d34915a8170926a35253d..ba70fc361501994544f27fd661b3b35942ce639c 100644 --- a/src/MissionManager/QGCMapPolygonVisuals.qml +++ b/src/MissionManager/QGCMapPolygonVisuals.qml @@ -1,4 +1,4 @@ -/**************************************************************************** +/**************************************************************************** * * (c) 2009-2016 QGROUNDCONTROL PROJECT * diff --git a/src/MissionManager/WimaController.h b/src/MissionManager/WimaController.h index 59d42be77572e912932aebc62d8372363f9d5974..0b404d307bf98183114bd2f385a562857aa32d16 100644 --- a/src/MissionManager/WimaController.h +++ b/src/MissionManager/WimaController.h @@ -20,7 +20,6 @@ public: //Property Accessors WimaFlyArea *flyArea (void) { return _flyArea; } //QmlObjectListModel* visualItems (void) { return _visualItems; } - QString QMLView Q_INVOKABLE void start(void); diff --git a/src/MissionManager/WimaFlyArea.cc b/src/MissionManager/WimaFlyArea.cc index 92d1d3a74189c74808ffac1d6ccb942baa43b587..90a418095b6f287b050725485f37333579f62aa6 100644 --- a/src/MissionManager/WimaFlyArea.cc +++ b/src/MissionManager/WimaFlyArea.cc @@ -25,6 +25,12 @@ void WimaFlyArea::_init() void WimaFlyArea::append_WimaFlyArea() { QGCMapPolygon *newPolygon = new QGCMapPolygon(); + newPolygon->setInteractive(true); + + for (int i = 0; i < _polygons->count(); i++) { + QGCMapPolygon* polygon = qobject_cast(_polygons->get(i)); + polygon->setInteractive(false); + } _polygons->append(newPolygon); diff --git a/src/MissionManager/WimaFlyArea.h b/src/MissionManager/WimaFlyArea.h index 089b5d02db7f3b9d3845d99c32db321137992cd8..9ea9ecc2d4c53a64efc508a1327a35d44c089c25 100644 --- a/src/MissionManager/WimaFlyArea.h +++ b/src/MissionManager/WimaFlyArea.h @@ -34,7 +34,8 @@ signals: public slots: private: - QmlObjectListModel *_polygons; + QmlObjectListModel* _polygons; + QGCMapPolygon* _isCurrentPolygon; }; diff --git a/src/WimaView/FlyAreaPolygonMapVisual.qml b/src/WimaView/FlyAreaPolygonMapVisual.qml index 5eabc85a9741c4e0f3f8ae5b8bb6458289fc77a2..d7a5ef0016ecda4b9a0a52a35825b9d8855e183b 100644 --- a/src/WimaView/FlyAreaPolygonMapVisual.qml +++ b/src/WimaView/FlyAreaPolygonMapVisual.qml @@ -69,7 +69,6 @@ Item { qgcView: _root.qgcView mapControl: map mapPolygon: _flyAreaPolygon - interactive: true borderWidth: 1 borderColor: "black" interiorColor: "green" diff --git a/src/WimaView/WimaView.qml b/src/WimaView/WimaView.qml index 91db40d78dc9722830f920c7d195e40da8347835..fff8bd9cc82fecb665a8148380b4a77453e5fbd6 100644 --- a/src/WimaView/WimaView.qml +++ b/src/WimaView/WimaView.qml @@ -112,8 +112,6 @@ QGCView { property bool _firstRallyLoadComplete: false property bool _firstLoadComplete: false - - MapFitFunctions { id: mapFitFunctions // The name for this id cannot be changed without breaking references outside of this code. Beware! map: editorMap @@ -1201,7 +1199,7 @@ QGCView { height: 150 radius: 10 border.color: "black" - border.width: 3 + border.width: 2 color: "green" z:100 @@ -1213,15 +1211,20 @@ QGCView { text: qsTr("Debug Messages") } - Text { - id: debugText - anchors.bottom: parent.bottom - x: (parent.width - width)/2 - width: parent.width*0.95 - height: parent.height-debugTextTitle.height - text: "Polygon count: " + wimaController.flyArea.polygons.dirty; - + Column { + id: debugMessageText + Repeater{ + model: _flyArea.polygons + delegate: Rectangle{ + color: "lightsteelblue" + radius: 5 + Text { + text: object.interactive + } + } + } } + } } // QGCVIew