Skip to content
Permalink
Browse files

Fix add part tool doesn't work

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 50cab5317f05d7a6d31190a93f8e0aa74047c02c
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/qgsvectorlayereditutils.cpp
@@ -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 )
{
@@ -187,6 +189,8 @@ int QgsVectorLayerEditUtils::addPart( QgsCurveV2* ring, QgsFeatureId featureId )
geometry = *f.geometry();
}

geometry.convertToMultiType();

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

0 comments on commit 50cab53

Please sign in to comment.
You can’t perform that action at this time.