Skip to content
Permalink
Browse files

fix 53d90b5

  • Loading branch information
jef-n committed Jun 13, 2017
1 parent 57e122b commit 145a5125a8a4460d642548ab8b35f9424975cb20
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/core/qgsvectorlayereditbuffer.cpp
@@ -310,13 +310,15 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )
{
if ( cap & QgsVectorDataProvider::AddFeatures )
{
for ( QgsFeature f : mAddedFeatures )
QgsFeatureMap::iterator featureIt = mAddedFeatures.begin();
for ( ; featureIt != mAddedFeatures.end(); ++featureIt )
{
if (( ! f.geometry() ) || ( f.geometry()->isEmpty() ) ||
( f.geometry()->wkbType() == provider->geometryType() ) )
if ( !featureIt->geometry() ||
featureIt->geometry()->isEmpty() ||
featureIt->geometry()->wkbType() == provider->geometryType() )
continue;

if ( ! provider->convertToProviderType( f.geometry() ) )
if ( !provider->convertToProviderType( featureIt->geometry() ) )
{
commitErrors << tr( "ERROR: %n feature(s) not added - geometry type is not compatible with the current layer.", "not added features count", mAddedFeatures.size() );
success = false;

0 comments on commit 145a512

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