Skip to content

Commit

Permalink
Update qgsvectorlayereditbuffer.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeDorelon committed Apr 18, 2013
1 parent f8834f2 commit a6e2fc1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/core/qgsvectorlayereditbuffer.cpp
Expand Up @@ -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;

Expand Down

0 comments on commit a6e2fc1

Please sign in to comment.