Skip to content

Commit

Permalink
Allow searching for features with a short search string
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored and nyalldawson committed Oct 18, 2018
1 parent a151deb commit ac4f7b5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/locator/qgsinbuiltlocatorfilters.cpp
Expand Up @@ -208,7 +208,8 @@ QgsActiveLayerFeaturesLocatorFilter *QgsActiveLayerFeaturesLocatorFilter::clone(

void QgsActiveLayerFeaturesLocatorFilter::prepare( const QString &string, const QgsLocatorContext &context )
{
if ( string.length() < 3 || context.usingPrefix )
// Normally skip very short search strings, unless when specifically searching using this filter
if ( string.length() < 3 && !context.usingPrefix )
return;

bool allowNumeric = false;
Expand Down Expand Up @@ -330,7 +331,8 @@ QgsAllLayersFeaturesLocatorFilter *QgsAllLayersFeaturesLocatorFilter::clone() co

void QgsAllLayersFeaturesLocatorFilter::prepare( const QString &string, const QgsLocatorContext &context )
{
if ( string.length() < 3 || context.usingPrefix )
// Normally skip very short search strings, unless when specifically searching using this filter
if ( string.length() < 3 && !context.usingPrefix )
return;

const QMap<QString, QgsMapLayer *> layers = QgsProject::instance()->mapLayers();
Expand Down

0 comments on commit ac4f7b5

Please sign in to comment.