Skip to content

Commit

Permalink
Also set correct expression context on feature request
Browse files Browse the repository at this point in the history
(cherry picked from commit ba5692c)
  • Loading branch information
nyalldawson committed Jun 21, 2021
1 parent a232222 commit 7f57c8b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/app/qgsmaptoolselectutils.cpp
Expand Up @@ -287,6 +287,7 @@ QgsFeatureIds QgsMapToolSelectUtils::getMatchingFeatures( QgsMapCanvas *canvas,
}
}

request.setExpressionContext( context.expressionContext() );
QgsFeatureIterator fit = vlayer->getFeatures( request );

QgsFeature f;
Expand Down
1 change: 1 addition & 0 deletions src/app/vertextool/qgsvertextool.cpp
Expand Up @@ -584,6 +584,7 @@ void QgsVertexTool::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
request.setSubsetOfAttributes( r->usedAttributes( context ), vlayer->fields() );
else
request.setNoAttributes();
request.setExpressionContext( context.expressionContext() );

QgsFeature f;
QgsFeatureIterator fi = vlayer->getFeatures( request );
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsmaptip.cpp
Expand Up @@ -256,6 +256,7 @@ QString QgsMapTip::fetchFeature( QgsMapLayer *layer, QgsPointXY &mapPosition, Qg
request.combineFilterExpression( filterExpression );
}
}
request.setExpressionContext( renderCtx.expressionContext() );

QgsFeatureIterator it = vlayer->getFeatures( request );
QElapsedTimer timer;
Expand Down

0 comments on commit 7f57c8b

Please sign in to comment.