Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
update feature id of added features in OGR and PostgrSQL provider
git-svn-id: http://svn.osgeo.org/qgis/trunk@8583 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Jun 3, 2008
1 parent 97f3618 commit 42b8445
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -554,6 +554,8 @@ bool QgsOgrProvider::addFeature(QgsFeature& f)
{
QgsLogger::warning("Writing of the feature failed");
returnValue = false;
} else {
f.setFeatureId( OGR_F_GetFID(feature) );
}
++numberFeatures;
OGR_F_Destroy( feature );
Expand Down
1 change: 1 addition & 0 deletions src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -1843,6 +1843,7 @@ bool QgsPostgresProvider::addFeatures(QgsFeatureList & flist)
QList<QByteArray> qparam;
qparam.append( geomParam.toUtf8() );
qparam.append( QString("%1").arg( ++primaryKeyHighWater ).toUtf8() );
features->setFeatureId( primaryKeyHighWater );
param[0] = qparam[0];
param[1] = qparam[1];

Expand Down

0 comments on commit 42b8445

Please sign in to comment.