Skip to content

Commit ac4f7b5

Browse files
m-kuhnnyalldawson
authored andcommittedOct 18, 2018
Allow searching for features with a short search string
1 parent a151deb commit ac4f7b5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/app/locator/qgsinbuiltlocatorfilters.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ QgsActiveLayerFeaturesLocatorFilter *QgsActiveLayerFeaturesLocatorFilter::clone(
208208

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

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

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

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

0 commit comments

Comments
 (0)
Please sign in to comment.