Skip to content
Permalink
Browse files
Support early interruption of evaluation of expressions in vector ren…
…derer
  • Loading branch information
nyalldawson committed Jun 18, 2021
1 parent ce9bae7 commit e7433f4fccd6e20a528728f553bc219d81f6522f
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/vector/qgsvectorlayerrenderer.cpp
@@ -393,6 +393,9 @@ bool QgsVectorLayerRenderer::renderInternal( QgsFeatureRenderer *renderer )
}

featureRequest.setFeedback( mInterruptionChecker.get() );
// also set the interruption checker for the expression context, in case the renderer uses some complex expression
// which could benefit from early exit paths...
context.expressionContext().setFeedback( mInterruptionChecker.get() );

QgsFeatureIterator fit = mSource->getFeatures( featureRequest );
// Attach an interruption checker so that iterators that have potentially
@@ -416,6 +419,7 @@ bool QgsVectorLayerRenderer::renderInternal( QgsFeatureRenderer *renderer )
renderer->paintEffect()->end( context );
}

context.expressionContext().setFeedback( nullptr );
mInterruptionChecker.reset();
return true;
}

0 comments on commit e7433f4

Please sign in to comment.