Skip to content
Permalink
Browse files

Fix QgsGeometryEditUtils::addPart deleting added geometry

  • Loading branch information
manisandro committed Sep 21, 2015
1 parent 7573afc commit 5f78d1c9fa59fe645d7c36e41d4acff7ffd63518
Showing with 1 addition and 6 deletions.
  1. +1 −6 src/core/geometry/qgsgeometryeditutils.cpp
@@ -134,7 +134,7 @@ int QgsGeometryEditUtils::addPart( QgsAbstractGeometryV2* geom, QgsAbstractGeome

int i;
int n = geomCollection->numGeometries();
for ( i = 0; i < parts->numGeometries() && geomCollection->addGeometry( parts->geometryN( i ) ); i++ )
for ( i = 0; i < parts->numGeometries() && geomCollection->addGeometry( parts->geometryN( i )->clone() ); i++ )
;

added = i == parts->numGeometries();
@@ -145,11 +145,6 @@ int QgsGeometryEditUtils::addPart( QgsAbstractGeometryV2* geom, QgsAbstractGeome
delete part; return 2;
}

while ( parts->numGeometries() > 0 )
{
parts->removeGeometry( 0 );
}

delete part;
}
else

0 comments on commit 5f78d1c

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