Skip to content

Commit ae11a73

Browse files
committedJun 2, 2015
ogr provider: only reset feature id of added feature, if OGR assigned one (fixes #12648)
1 parent 710e7f7 commit ae11a73

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/providers/ogr/qgsogrprovider.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,9 @@ bool QgsOgrProvider::addFeature( QgsFeature& f )
10701070
}
10711071
else
10721072
{
1073-
f.setFeatureId( OGR_F_GetFID( feature ) );
1073+
long id = OGR_F_GetFID( feature );
1074+
if ( id >= 0 )
1075+
f.setFeatureId( id );
10741076
}
10751077
OGR_F_Destroy( feature );
10761078

0 commit comments

Comments
 (0)
Please sign in to comment.