Skip to content
Permalink
Browse files

fix #3374

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15108 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Jan 30, 2011
1 parent 35c53b3 commit cf14052660c8a657a0dd2398597fe6db511849e6
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/core/qgsvectorfilewriter.cpp
@@ -368,6 +368,15 @@ bool QgsVectorFileWriter::addFeature( QgsFeature& feature )
// create the feature
OGRFeatureH poFeature = OGR_F_Create( OGR_L_GetLayerDefn( mLayer ) );

OGRErr err = OGR_F_SetFID( poFeature, feature.id() );
if ( err != OGRERR_NONE )
{
QgsDebugMsg( QString( "Failed to set feature id to %1: %2 (OGR error: %3)" )
.arg( feature.id() )
.arg( err ).arg( CPLGetLastErrorMsg() )
);
}

// attribute handling
QgsFieldMap::const_iterator fldIt;
for ( fldIt = mFields.begin(); fldIt != mFields.end(); ++fldIt )

0 comments on commit cf14052

Please sign in to comment.
You can’t perform that action at this time.