Skip to content
Permalink
Browse files

[all features locator] respect search limits

  • Loading branch information
m-kuhn committed Nov 18, 2020
1 parent 2899ae1 commit 471062c520ea1d878ad71f194341bdd00aa9f517
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/app/locator/qgsinbuiltlocatorfilters.cpp
@@ -563,12 +563,12 @@ QStringList QgsAllLayersFeaturesLocatorFilter::prepare( const QString &string, c
enhancedSearch.replace( ' ', '%' );
req.setFilterExpression( QStringLiteral( "%1 ILIKE '%%2%'" )
.arg( layer->displayExpression(), enhancedSearch ) );
req.setLimit( 6 );
req.setLimit( mMaxResultsPerLayer );

QgsFeatureRequest exactMatchRequest = req;
exactMatchRequest.setFilterExpression( QStringLiteral( "%1 ILIKE '%2'" )
.arg( layer->displayExpression(), enhancedSearch ) );
exactMatchRequest.setLimit( 10 );
exactMatchRequest.setLimit( mMaxResultsPerLayer );

std::shared_ptr<PreparedLayer> preparedLayer( new PreparedLayer() );
preparedLayer->expression = expression;

0 comments on commit 471062c

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