Skip to content
Permalink
Browse files

Expresson widget - Set first item on search result

For Nyall :)
  • Loading branch information
NathanW2 committed Feb 23, 2016
1 parent 24d1bd0 commit fad0b1d15e1890b4323939ac203d8b5363e3ba90
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/gui/qgsexpressionbuilderwidget.cpp
@@ -633,9 +633,19 @@ void QgsExpressionBuilderWidget::on_txtSearchEdit_textChanged()
{
mProxyModel->setFilterWildcard( txtSearchEdit->text() );
if ( txtSearchEdit->text().isEmpty() )
{
expressionTree->collapseAll();
}
else
{
expressionTree->expandAll();
QModelIndex index = mProxyModel->index( 0, 0 );
if ( mProxyModel->hasChildren( index ) )
{
QModelIndex child = mProxyModel->index( 0, 0, index );
expressionTree->selectionModel()->setCurrentIndex( child, QItemSelectionModel::ClearAndSelect );
}
}
}

void QgsExpressionBuilderWidget::on_txtSearchEditValues_textChanged()

0 comments on commit fad0b1d

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