File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,8 @@ void QgsOptionsDialogBase::restoreOptionsBaseUi( const QString &title )
207
207
208
208
void QgsOptionsDialogBase::searchText ( const QString &text )
209
209
{
210
+ const int minimumTextLength = 3 ;
211
+
210
212
mSearchLineEdit ->setMinimumWidth ( text.isEmpty () ? 0 : 70 );
211
213
212
214
if ( !mOptStackedWidget )
@@ -219,12 +221,12 @@ void QgsOptionsDialogBase::searchText( const QString &text )
219
221
// hide all page if text has to be search, show them all otherwise
220
222
for ( int r = 0 ; r < mOptListWidget ->count (); ++r )
221
223
{
222
- mOptListWidget ->setRowHidden ( r, ! text.isEmpty () );
224
+ mOptListWidget ->setRowHidden ( r, text.length () >= minimumTextLength );
223
225
}
224
226
225
227
for ( const QPair< QgsOptionsDialogHighlightWidget *, int > &rsw : qgis::as_const ( mRegisteredSearchWidgets ) )
226
228
{
227
- if ( rsw.first ->searchHighlight ( text ) )
229
+ if ( rsw.first ->searchHighlight ( text. length () >= minimumTextLength ? text : QString () ) )
228
230
{
229
231
mOptListWidget ->setRowHidden ( rsw.second , false );
230
232
}
You can’t perform that action at this time.
0 commit comments