Skip to content

Commit 891e665

Browse files
committedDec 26, 2012
Let ogr give ids to created features (otherwise, there are problems with exported dxf files)
1 parent c74509e commit 891e665

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed
 

‎src/core/qgsvectorfilewriter.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -502,15 +502,14 @@ OGRFeatureH QgsVectorFileWriter::createFeature( QgsFeature& feature )
502502
if ( fid > std::numeric_limits<int>::max() )
503503
{
504504
QgsDebugMsg( QString( "feature id %1 too large." ).arg( fid ) );
505-
}
506-
507-
OGRErr err = OGR_F_SetFID( poFeature, static_cast<long>( fid ) );
508-
if ( err != OGRERR_NONE )
509-
{
510-
QgsDebugMsg( QString( "Failed to set feature id to %1: %2 (OGR error: %3)" )
511-
.arg( feature.id() )
512-
.arg( err ).arg( CPLGetLastErrorMsg() )
513-
);
505+
OGRErr err = OGR_F_SetFID( poFeature, static_cast<long>( fid ) );
506+
if ( err != OGRERR_NONE )
507+
{
508+
QgsDebugMsg( QString( "Failed to set feature id to %1: %2 (OGR error: %3)" )
509+
.arg( feature.id() )
510+
.arg( err ).arg( CPLGetLastErrorMsg() )
511+
);
512+
}
514513
}
515514

516515
// attribute handling

0 commit comments

Comments
 (0)
Please sign in to comment.