Skip to content
Permalink
Browse files

Update qgsvectorlayereditbuffer.cpp

  • Loading branch information
PhilippeDorelon committed Apr 18, 2013
1 parent f8834f2 commit a6e2fc199435e81233e05e0f10eeb76ebf016c30
Showing with 9 additions and 2 deletions.
  1. +9 −2 src/core/qgsvectorlayereditbuffer.cpp
@@ -99,8 +99,15 @@ bool QgsVectorLayerEditBuffer::addFeature( QgsFeature& f )
{
return false;
}

int layerFieldCount = L->dataProvider()->fields().count() + mAddedAttributes.count() - mDeletedAttributeIds.count();
int layerFieldJoinCount=0;
for ( int i = 0; i < L->mUpdatedFields.count(); ++i )
{
if ( L->mUpdatedFields.fieldOrigin(i)==QgsFields::OriginJoin )
{
layerFieldJoinCount++;
}
}
int layerFieldCount = L->dataProvider()->fields().count() + layerFieldJoinCount + mAddedAttributes.count() - mDeletedAttributeIds.count();int layerFieldCount = L->dataProvider()->fields().count() + mAddedAttributes.count() - mDeletedAttributeIds.count();
if ( layerFieldCount != f.attributes().count() )
return false;

0 comments on commit a6e2fc1

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