Skip to content

Commit

Permalink
Use request feedback in expression context for virtual attributes, so…
Browse files Browse the repository at this point in the history
… that

early abortion of evaluation of virtual attributes is supported
  • Loading branch information
nyalldawson committed Jun 18, 2021
1 parent 1b256a0 commit ce9bae7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/vector/qgsvectorlayerfeatureiterator.cpp
Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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 )
Expand Down

0 comments on commit ce9bae7

Please sign in to comment.