Skip to content

Commit b460eeb

Browse files
committed
Followup 2995bdc: Don't iterate changed geometries twice
1 parent 2995bdc commit b460eeb

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/core/qgsvectorlayerfeatureiterator.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ bool QgsVectorLayerFeatureIterator::nextFeature( QgsFeature& f )
9595
return res;
9696
}
9797

98+
if ( mRequest.filterType() == QgsFeatureRequest::FilterRect )
99+
{
100+
if ( fetchNextChangedGeomFeature( f ) )
101+
return true;
102+
}
103+
// no more changed geometries
104+
98105
while ( mProviderIterator.nextFeature( f ) )
99106
{
100107
if ( mFetchConsidered.contains( f.id() ) )
@@ -118,14 +125,6 @@ bool QgsVectorLayerFeatureIterator::nextFeature( QgsFeature& f )
118125
}
119126
// no more provider features
120127

121-
if ( mRequest.filterType() == QgsFeatureRequest::FilterRect )
122-
{
123-
if ( fetchNextChangedGeomFeature( f ) )
124-
return true;
125-
}
126-
// no more changed geometries
127-
128-
129128
if ( fetchNextAddedFeature( f ) )
130129
return true;
131130
// no more added features

0 commit comments

Comments
 (0)