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)

(cherry picked from commit ae11a73)
  • Loading branch information
jef-n committed Jun 29, 2015
1 parent 9ef8b29 commit 9c1186a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/providers/ogr/qgsogrprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,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 9c1186a

Please sign in to comment.