Skip to content

Commit

Permalink
Merge pull request #546 from PhilippeDorelon/addfeatureJoin
Browse files Browse the repository at this point in the history
Fix #7072 : can't create a feature when a layer has a join
  • Loading branch information
NathanW2 committed Jul 9, 2013
2 parents 0bb9543 + 9179953 commit aca3dfa
Showing 1 changed file with 1 addition and 3 deletions.
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

0 comments on commit aca3dfa

Please sign in to comment.