Skip to content

Commit 2b33789

Browse files
author
jef
committedJun 3, 2008
update feature id of added features in OGR and PostgrSQL provider
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8583 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed
 

‎src/providers/ogr/qgsogrprovider.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,8 @@ bool QgsOgrProvider::addFeature(QgsFeature& f)
554554
{
555555
QgsLogger::warning("Writing of the feature failed");
556556
returnValue = false;
557+
} else {
558+
f.setFeatureId( OGR_F_GetFID(feature) );
557559
}
558560
++numberFeatures;
559561
OGR_F_Destroy( feature );

‎src/providers/postgres/qgspostgresprovider.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1843,6 +1843,7 @@ bool QgsPostgresProvider::addFeatures(QgsFeatureList & flist)
18431843
QList<QByteArray> qparam;
18441844
qparam.append( geomParam.toUtf8() );
18451845
qparam.append( QString("%1").arg( ++primaryKeyHighWater ).toUtf8() );
1846+
features->setFeatureId( primaryKeyHighWater );
18461847
param[0] = qparam[0];
18471848
param[1] = qparam[1];
18481849

0 commit comments

Comments
 (0)
Please sign in to comment.