Transactions: addFeature propagates new feature id

This commit is contained in:
Matthias Kuhn 2015-11-27 15:56:37 +01:00
parent 055ef76a68
commit 497191bf40

View File

@ -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;
}