Commit d2ef6d01 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #4986 from DonLakeFlyer/PolygonFix

Generate polygon model when loading from json
parents eaca86d3 1e20eb8a
......@@ -174,6 +174,11 @@ bool QGCMapPolygon::loadFromJson(const QJsonObject& json, bool required, QString
if (!JsonHelper::loadGeoCoordinateArray(json[jsonPolygonKey], false /* altitudeRequired */, _polygonPath, errorString)) {
return false;
}
for (int i=0; i<_polygonPath.count(); i++) {
_polygonModel.append(new QGCQGeoCoordinate(_polygonPath[i].value<QGeoCoordinate>(), _newCoordParent));
}
setDirty(false);
emit pathChanged();
......
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