Skip to content

Commit

Permalink
[all features locator] respect search limits
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Nov 18, 2020
1 parent 2899ae1 commit 471062c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/locator/qgsinbuiltlocatorfilters.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 471062c

Please sign in to comment.