From b688f2c0545641dbc18f03461c6f270cc51f9fa0 Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Mon, 13 Mar 2017 17:21:25 -0700 Subject: [PATCH] Fix binding to repeater index Otherwise things go haywire when points are added --- custom | 1 + src/MissionEditor/SurveyMapVisual.qml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 120000 custom diff --git a/custom b/custom new file mode 120000 index 000000000..b008f1570 --- /dev/null +++ b/custom @@ -0,0 +1 @@ +/Users/Don/repos/qgc-typhoon-custom/custom/ \ No newline at end of file diff --git a/src/MissionEditor/SurveyMapVisual.qml b/src/MissionEditor/SurveyMapVisual.qml index c49802799..34c22db3f 100644 --- a/src/MissionEditor/SurveyMapVisual.qml +++ b/src/MissionEditor/SurveyMapVisual.qml @@ -304,7 +304,8 @@ Item { var dragHandle = dragHandleComponent.createObject(map) dragHandle.coordinate = Qt.binding(function() { return object.coordinate }) map.addMapItem(dragHandle) - var dragArea = dragAreaComponent.createObject(map, { "itemIndicator": dragHandle, "itemCoordinate": object.coordinate, "polygonVertex": index }) + var dragArea = dragAreaComponent.createObject(map, { "itemIndicator": dragHandle, "itemCoordinate": object.coordinate }) + dragArea.polygonVertex = Qt.binding(function() { return index }) _visuals.push(dragHandle) _visuals.push(dragArea) } -- 2.22.0