Skip to content

Commit

Permalink
ogr provider: only reset feature id of added feature, if OGR assigned…
Browse files Browse the repository at this point in the history
… one (fixes #12648)
  • Loading branch information
jef-n committed Jun 2, 2015
1 parent 710e7f7 commit ae11a73
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -1070,7 +1070,9 @@ bool QgsOgrProvider::addFeature( QgsFeature& f )
}
else
{
f.setFeatureId( OGR_F_GetFID( feature ) );
long id = OGR_F_GetFID( feature );
if ( id >= 0 )
f.setFeatureId( id );
}
OGR_F_Destroy( feature );

Expand Down

0 comments on commit ae11a73

Please sign in to comment.