Showing with 1 addition and 3 deletions.
  1. +1 −3 src/core/qgsvectorlayereditbuffer.cpp
4 changes: 1 addition & 3 deletions src/core/qgsvectorlayereditbuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ bool QgsVectorLayerEditBuffer::addFeature( QgsFeature& f )
{
return false;
}

int layerFieldCount = L->dataProvider()->fields().count() + mAddedAttributes.count() - mDeletedAttributeIds.count();
if ( layerFieldCount != f.attributes().count() )
if ( L->mUpdatedFields.count() != f.attributes().count() )
return false;

// TODO: check correct geometry type
Expand Down