Skip to content

Commit

Permalink
Followup 2995bdc: Don't iterate changed geometries twice
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Aug 20, 2013
1 parent 2995bdc commit b460eeb
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/core/qgsvectorlayerfeatureiterator.cpp
Expand Up @@ -95,6 +95,13 @@ bool QgsVectorLayerFeatureIterator::nextFeature( QgsFeature& f )
return res;
}

if ( mRequest.filterType() == QgsFeatureRequest::FilterRect )
{
if ( fetchNextChangedGeomFeature( f ) )
return true;
}
// no more changed geometries

while ( mProviderIterator.nextFeature( f ) )
{
if ( mFetchConsidered.contains( f.id() ) )
Expand All @@ -118,14 +125,6 @@ bool QgsVectorLayerFeatureIterator::nextFeature( QgsFeature& f )
}
// no more provider features

if ( mRequest.filterType() == QgsFeatureRequest::FilterRect )
{
if ( fetchNextChangedGeomFeature( f ) )
return true;
}
// no more changed geometries


if ( fetchNextAddedFeature( f ) )
return true;
// no more added features
Expand Down

0 comments on commit b460eeb

Please sign in to comment.