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 497191b
Showing 1 changed file with 4 additions and 1 deletion.
@@ -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.