Skip to content

Commit

Permalink
Skip extra request if there are enough results
Browse files Browse the repository at this point in the history
If we already have the maximum number of results with an exact match request
we do not need to send an extra request and list one additional result.
  • Loading branch information
m-kuhn committed Nov 18, 2020
1 parent 471062c commit ceb4238
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/locator/qgsinbuiltlocatorfilters.cpp
Expand Up @@ -625,6 +625,8 @@ void QgsAllLayersFeaturesLocatorFilter::fetchResults( const QString &string, con
if ( foundInCurrentLayer >= mMaxResultsPerLayer )
break;
}
if ( foundInCurrentLayer >= mMaxResultsPerLayer )
continue;
if ( foundInTotal >= mMaxTotalResults )
break;

Expand Down

0 comments on commit ceb4238

Please sign in to comment.