Skip to content
Permalink
Browse files
Don't request anymore features after request feedback is canceled
  • Loading branch information
nyalldawson committed Jun 18, 2021
1 parent b16465b commit d5708c2c0f06e9d9a7ca330bd56db76f4c6fe74c
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/qgsfeatureiterator.cpp
@@ -18,6 +18,7 @@
#include "qgssimplifymethod.h"
#include "qgsexception.h"
#include "qgsexpressionsorter.h"
#include "qgsfeedback.h"

QgsAbstractFeatureIterator::QgsAbstractFeatureIterator( const QgsFeatureRequest &request )
: mRequest( request )
@@ -32,6 +33,9 @@ bool QgsAbstractFeatureIterator::nextFeature( QgsFeature &f )
return false;
}

if ( mRequest.feedback() && mRequest.feedback()->isCanceled() )
return false;

if ( mUseCachedFeatures )
{
if ( mFeatureIterator != mCachedFeatures.constEnd() )

0 comments on commit d5708c2

Please sign in to comment.