Skip to content

Commit

Permalink
When adding ring to a geometry, add z or m dimensions to the
Browse files Browse the repository at this point in the history
ring geometry if required (fix #7400, #7401)
  • Loading branch information
nyalldawson committed Oct 13, 2015
1 parent a333fc8 commit 957d826
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/geometry/qgsgeometryeditutils.cpp
Expand Up @@ -81,6 +81,13 @@ int QgsGeometryEditUtils::addRing( QgsAbstractGeometryV2* geom, QgsCurveV2* ring
delete ring; return 4;
}
}

//make sure dimensionality of ring matches geometry
if ( QgsWKBTypes::hasZ( geom->wkbType() ) )
ring->addZValue( 0 );
if ( QgsWKBTypes::hasM( geom->wkbType() ) )
ring->addMValue( 0 );

( *polyIter )->addInteriorRing( ring );
return 0; //success
}
Expand Down

0 comments on commit 957d826

Please sign in to comment.