1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-30 22:51:16 +01:00

Fixed KML Polygons loading

This commit is contained in:
Martin Tůma 2019-02-01 00:25:41 +01:00
parent 50306ecb84
commit 4854bff31b

View File

@ -296,14 +296,14 @@ void KMLParser::polygon(Area &area)
while (_reader.readNextStartElement()) { while (_reader.readNextStartElement()) {
if (_reader.name() == QLatin1String("outerBoundaryIs")) { if (_reader.name() == QLatin1String("outerBoundaryIs")) {
if (!area.isEmpty()) { if (!polygon.isEmpty()) {
_reader.raiseError("Multiple polygon outerBoundaryIss"); _reader.raiseError("Multiple polygon outerBoundaryIss");
return; return;
} }
polygon.append(QVector<Coordinates>()); polygon.append(QVector<Coordinates>());
boundary(polygon.last()); boundary(polygon.last());
} else if (_reader.name() == QLatin1String("innerBoundaryIs")) { } else if (_reader.name() == QLatin1String("innerBoundaryIs")) {
if (area.isEmpty()) { if (polygon.isEmpty()) {
_reader.raiseError("Missing polygon outerBoundaryIs"); _reader.raiseError("Missing polygon outerBoundaryIs");
return; return;
} }