Skip to content
Permalink
Browse files

[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 3c95b8b2694e1f107e95124ca1ad57530a5657ce
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/app/locator/qgsinbuiltlocatorfilters.cpp
@@ -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;
@@ -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();

0 comments on commit 3c95b8b

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