Skip to content

Commit

Permalink
update feature id of added features in OGR and PostgrSQL provider
Browse files Browse the repository at this point in the history
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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.