Skip to content
Permalink
Browse files

Allow searching for features with a short search string

  • Loading branch information
m-kuhn authored and nyalldawson committed Oct 18, 2018
1 parent a151deb commit ac4f7b5f55121473a1fe9ef4fe98096a495eb55e
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/app/locator/qgsinbuiltlocatorfilters.cpp
@@ -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;
@@ -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();

0 comments on commit ac4f7b5

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