[QGIS Commit] r8583 - in trunk/qgis/src/providers: ogr postgres

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Jun 3 10:41:04 EDT 2008


Author: jef
Date: 2008-06-03 10:41:04 -0400 (Tue, 03 Jun 2008)
New Revision: 8583

Modified:
   trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
   trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
Log:
update feature id of added features in OGR and PostgrSQL provider

Modified: trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
===================================================================
--- trunk/qgis/src/providers/ogr/qgsogrprovider.cpp	2008-06-03 14:36:56 UTC (rev 8582)
+++ trunk/qgis/src/providers/ogr/qgsogrprovider.cpp	2008-06-03 14:41:04 UTC (rev 8583)
@@ -554,6 +554,8 @@
   {
     QgsLogger::warning("Writing of the feature failed");
     returnValue = false;
+  } else {
+    f.setFeatureId( OGR_F_GetFID(feature) );
   }
   ++numberFeatures;
   OGR_F_Destroy( feature );

Modified: trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp	2008-06-03 14:36:56 UTC (rev 8582)
+++ trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp	2008-06-03 14:41:04 UTC (rev 8583)
@@ -1843,6 +1843,7 @@
       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];
 



More information about the QGIS-commit mailing list