Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[locator] do not skip less than 3 chars when using prefix
you might really be looking for it, using the prefix makes it clear enough
  • Loading branch information
3nids committed Sep 12, 2018
1 parent 3b1b41f commit 3c95b8b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/locator/qgsinbuiltlocatorfilters.cpp
Expand Up @@ -206,9 +206,9 @@ QgsActiveLayerFeaturesLocatorFilter *QgsActiveLayerFeaturesLocatorFilter::clone(
return new QgsActiveLayerFeaturesLocatorFilter();
}

void QgsActiveLayerFeaturesLocatorFilter::prepare( const QString &string, const QgsLocatorContext & )
void QgsActiveLayerFeaturesLocatorFilter::prepare( const QString &string, const QgsLocatorContext &context )
{
if ( string.length() < 3 )
if ( string.length() < 3 || context.usingPrefix )
return;

bool allowNumeric = false;
Expand Down Expand Up @@ -317,9 +317,9 @@ QgsAllLayersFeaturesLocatorFilter *QgsAllLayersFeaturesLocatorFilter::clone() co
return new QgsAllLayersFeaturesLocatorFilter();
}

void QgsAllLayersFeaturesLocatorFilter::prepare( const QString &string, const QgsLocatorContext & )
void QgsAllLayersFeaturesLocatorFilter::prepare( const QString &string, const QgsLocatorContext &context )
{
if ( string.length() < 3 )
if ( string.length() < 3 || context.usingPrefix )
return;

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

0 comments on commit 3c95b8b

Please sign in to comment.