mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-06 00:05:02 -05:00
Transactions: addFeature propagates new feature id
This commit is contained in:
parent
055ef76a68
commit
497191bf40
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user