Skip to content

Commit 6430059

Browse files
committed
Remove safety check
Doesn't work correctly - flags valid matches as invalid
1 parent 2975339 commit 6430059

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/providers/ogr/qgsogrfeatureiterator.cpp

-15
Original file line numberDiff line numberDiff line change
@@ -207,21 +207,6 @@ bool QgsOgrFeatureIterator::fetchFeatureWithId( QgsFeatureId id, QgsFeature &fea
207207
// filtered layer, not the original layer!
208208
OGR_L_ResetReading( mOgrOrigLayer );
209209
fet.reset( OGR_L_GetFeature( mOgrOrigLayer, FID_TO_NUMBER( id ) ) );
210-
211-
// do a bit of a safety check - make sure that the original fid column value
212-
// matches the feature id which we actually requested.
213-
OGRFeatureDefnH fdef = OGR_L_GetLayerDefn( mOgrOrigLayer );
214-
int lastField = OGR_FD_GetFieldCount( fdef ) - 1;
215-
bool foundCorrect = false;
216-
if ( lastField >= 0 )
217-
foundCorrect = OGR_F_GetFieldAsInteger64( fet.get(), lastField ) == id;
218-
else
219-
foundCorrect = OGR_F_GetFID( fet.get() ) == id;
220-
221-
if ( !foundCorrect )
222-
{
223-
fet.reset();
224-
}
225210
}
226211
else
227212
{

0 commit comments

Comments
 (0)