Skip to content

Commit

Permalink
query builder: give focus to the SQL text area when shown
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed May 1, 2014
1 parent 2d7cd38 commit 7ab5e0a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/qgsquerybuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ QgsQueryBuilder::~QgsQueryBuilder()
settings.setValue( "/Windows/QueryBuilder/geometry", saveGeometry() );
}

void QgsQueryBuilder::showEvent( QShowEvent *event )
{
txtSQL->setFocus();
QDialog::showEvent( event );
}

void QgsQueryBuilder::populateFields()
{
const QgsFields& fields = mLayer->pendingFields();
Expand Down
2 changes: 2 additions & 0 deletions src/gui/qgsquerybuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ class GUI_EXPORT QgsQueryBuilder : public QDialog, private Ui::QgsQueryBuilderBa

~QgsQueryBuilder();

void showEvent( QShowEvent *event );

public slots:
void accept();
void reject();
Expand Down

0 comments on commit 7ab5e0a

Please sign in to comment.