Commit fb511780 authored by Dennis Nienhüser's avatar Dennis Nienhüser
Browse files

Do not skip unclosed ways when removeAt alters subsequent indices

parent aab2725f
......@@ -124,7 +124,7 @@ QList<GeoDataLinearRing> OsmRelation::rings(const QStringList &roles, const OsmW
bool ok = true;
while( ok ) {
ok = false;
for(int i = 0; i<unclosedWays.length(); ++i ) {
for(int i = 0; i<unclosedWays.length(); ) {
const OsmWay &nextWay = unclosedWays.at(i);
if( nextWay.references().first() == lastReference
|| nextWay.references().last() == lastReference ) {
......@@ -147,6 +147,8 @@ QList<GeoDataLinearRing> OsmRelation::rings(const QStringList &roles, const OsmW
ok = true;
currentWays << nextWay.osmData().id();
break;
} else {
++i;
}
}
}
......
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