Skip to content
Permalink
Browse files

set focus in code editor when showing expression builder

  • Loading branch information
3nids committed Nov 3, 2015
1 parent 1b435ed commit 1b170f99e6b6ce9ed9010dad40e7ca5560f5af89
Showing with 9 additions and 1 deletion.
  1. +6 −0 src/gui/qgsexpressionbuilderwidget.cpp
  2. +3 −1 src/gui/qgsexpressionbuilderwidget.h
@@ -622,6 +622,12 @@ void QgsExpressionBuilderWidget::loadExpressionContext()
}
}

void QgsExpressionBuilderWidget::showEvent( QShowEvent *e )
{
QWidget::showEvent( e );
txtExpressionString->setFocus();
}

void QgsExpressionBuilderWidget::on_txtSearchEdit_textChanged()
{
mProxyModel->setFilterWildcard( txtSearchEdit->text() );
@@ -259,6 +259,9 @@ class GUI_EXPORT QgsExpressionBuilderWidget : public QWidget, private Ui::QgsExp
*/
void expressionParsed( bool isValid );

protected:
void showEvent( QShowEvent *e );

private:
void runPythonCode( const QString& code );
void updateFunctionTree();
@@ -288,7 +291,6 @@ class GUI_EXPORT QgsExpressionBuilderWidget : public QWidget, private Ui::QgsExp
QString mRecentKey;
QMap<QString, QStringList> mFieldValues;
QgsExpressionContext mExpressionContext;

};

#endif // QGSEXPRESSIONBUILDER_H

0 comments on commit 1b170f9

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