Skip to content
Permalink
Browse files
Use request feedback in expression context for virtual attributes, so…
… that

early abortion of evaluation of virtual attributes is supported
  • Loading branch information
nyalldawson committed Jun 18, 2021
1 parent 1b256a0 commit ce9bae7633df7efae30697c5e788101dc2b5b166
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/vector/qgsvectorlayerfeatureiterator.cpp
@@ -122,7 +122,6 @@ QString QgsVectorLayerFeatureSource::id() const
QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator( QgsVectorLayerFeatureSource *source, bool ownSource, const QgsFeatureRequest &request )
: QgsAbstractFeatureIteratorFromSource<QgsVectorLayerFeatureSource>( source, ownSource, request )
, mFetchedFid( false )

{
if ( mRequest.destinationCrs().isValid() && mRequest.destinationCrs() != mSource->mCrs )
{
@@ -1222,6 +1221,7 @@ void QgsVectorLayerFeatureIterator::createExpressionContext()
mExpressionContext->appendScope( QgsExpressionContextUtils::globalScope() );
mExpressionContext->appendScope( QgsExpressionContextUtils::projectScope( QgsProject::instance() ) );
mExpressionContext->appendScope( new QgsExpressionContextScope( mSource->mLayerScope ) );
mExpressionContext->setFeedback( mRequest.feedback() );
}

bool QgsVectorLayerFeatureIterator::prepareOrderBy( const QList<QgsFeatureRequest::OrderByClause> &orderBys )

0 comments on commit ce9bae7

Please sign in to comment.