Unverified Commit 2847a40e authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #7030 from DonLakeFlyer/DoubleLoadShape

Plane: Fix double survey load from shape
parents cf5a59b8 1b77ef28
...@@ -338,8 +338,13 @@ QGCView { ...@@ -338,8 +338,13 @@ QGCView {
if (retList[0] == ShapeFileHelper.Error) { if (retList[0] == ShapeFileHelper.Error) {
_qgcView.showMessage("Error", retList[1], StandardButton.Ok) _qgcView.showMessage("Error", retList[1], StandardButton.Ok)
} else if (retList[0] == ShapeFileHelper.Polygon) { } else if (retList[0] == ShapeFileHelper.Polygon) {
polygonSelectPatternFile = file var editVehicle = _activeVehicle ? _activeVehicle : QGroundControl.multiVehicleManager.offlineEditingVehicle
_qgcView.showDialog(patternPolygonSelectDialog, fileDialog.title, _qgcView.showDialogDefaultWidth, StandardButton.Ok | StandardButton.Cancel) if (editVehicle.fixedWing) {
insertComplexMissionItemFromKMLOrSHP(_missionController.surveyComplexItemName, file, -1)
} else {
polygonSelectPatternFile = file
_qgcView.showDialog(patternPolygonSelectDialog, fileDialog.title, _qgcView.showDialogDefaultWidth, StandardButton.Ok | StandardButton.Cancel)
}
} else if (retList[0] == ShapeFileHelper.Polyline) { } else if (retList[0] == ShapeFileHelper.Polyline) {
insertComplexMissionItemFromKMLOrSHP(_missionController.corridorScanComplexItemName, file, -1) insertComplexMissionItemFromKMLOrSHP(_missionController.corridorScanComplexItemName, file, -1)
} }
...@@ -353,14 +358,6 @@ QGCView { ...@@ -353,14 +358,6 @@ QGCView {
id: patternPolygonSelectDialog id: patternPolygonSelectDialog
QGCViewDialog { QGCViewDialog {
Component.onCompleted: {
var editVehicle = _activeVehicle ? _activeVehicle : QGroundControl.multiVehicleManager.offlineEditingVehicle
if (editVehicle.fixedWing) {
surveyRadio.checked = true
accept()
}
}
function accept() { function accept() {
var complexItemName var complexItemName
if (surveyRadio.checked) { if (surveyRadio.checked) {
......
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