Skip to content
Permalink
Browse files
Also set correct expression context on feature request
  • Loading branch information
nyalldawson committed May 25, 2021
1 parent 98f6fcb commit 6ce91e40da91f62bf9bdc901643e4d2ad9a25cc2
Showing with 4 additions and 0 deletions.
  1. +2 −0 src/app/qgsmaptoolselectutils.cpp
  2. +1 −0 src/app/vertextool/qgsvertextool.cpp
  3. +1 −0 src/gui/qgsmaptip.cpp
@@ -294,6 +294,7 @@ QgsFeatureIds QgsMapToolSelectUtils::getMatchingFeatures( QgsMapCanvas *canvas,
}
}

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

QgsFeature f;
@@ -489,6 +490,7 @@ QgsFeatureIds QgsMapToolSelectUtils::QgsMapToolSelectMenuActions::search( std::s
request.combineFilterExpression( filterExpression );
}
}
request.setExpressionContext( data->context.expressionContext() );

QgsFeatureIterator fit = data->source->getFeatures( request );

@@ -586,6 +586,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 );
@@ -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;

0 comments on commit 6ce91e4

Please sign in to comment.