Skip to content
Permalink
Browse files

Delegate filter to provider when possible

  • Loading branch information
pblottiere committed Oct 15, 2020
1 parent a25a561 commit dd6b20e9e7b9efe974f59db6ca650c170b8c8062
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/gui/qgsmaptip.cpp
@@ -224,6 +224,12 @@ QString QgsMapTip::fetchFeature( QgsMapLayer *layer, QgsPointXY &mapPosition, Qg
renderer.reset( vlayer->renderer()->clone() );
renderer->startRender( renderCtx, vlayer->fields() );
filter = renderer->capabilities() & QgsFeatureRenderer::Filter;

const QString filterExpression = renderer->filter( vlayer->fields() );
if ( ! filterExpression.isEmpty() )
{
request.setFilterExpression( filterExpression );
}
}

QgsFeatureIterator it = vlayer->getFeatures( request );

0 comments on commit dd6b20e

Please sign in to comment.
You can’t perform that action at this time.