Skip to content

Commit

Permalink
Fix add part tool doesn't work
Browse files Browse the repository at this point in the history
Regardless of the underlying layer geometry type, the tool was
always reporting that geometries were not multipart
  • Loading branch information
nyalldawson authored and jef-n committed Sep 11, 2015
1 parent 8640c13 commit 50cab53
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/qgsvectorlayereditutils.cpp
Expand Up @@ -163,6 +163,8 @@ int QgsVectorLayerEditUtils::addPart( const QList<QgsPoint> &points, QgsFeatureI
geometry = *f.geometry();
}

geometry.convertToMultiType();

int errorCode = geometry.addPart( points, L->geometryType() );
if ( errorCode == 0 )
{
Expand All @@ -187,6 +189,8 @@ int QgsVectorLayerEditUtils::addPart( QgsCurveV2* ring, QgsFeatureId featureId )
geometry = *f.geometry();
}

geometry.convertToMultiType();

int errorCode = geometry.addPart( ring );
if ( errorCode == 0 )
{
Expand Down

0 comments on commit 50cab53

Please sign in to comment.