Skip to content
Permalink
Browse files

Transactions: addFeature propagates new feature id

  • Loading branch information
m-kuhn committed Nov 27, 2015
1 parent 055ef76 commit 497191bf40cb9fdbbeef986dc4e19da50fe8059b
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/core/qgsvectorlayereditpassthrough.cpp
@@ -20,8 +20,11 @@
bool QgsVectorLayerEditPassthrough::addFeature( QgsFeature& f )
{

if ( L->dataProvider()->addFeatures( QgsFeatureList() << f ) )
QgsFeatureList fl;
fl << f;
if ( L->dataProvider()->addFeatures( fl) )
{
f.setFeatureId( fl.first().id() );
emit featureAdded( f.id() );
return true;
}

0 comments on commit 497191b

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