Skip to content

Commit

Permalink
Merge pull request #403 from matthias-kuhn/expression-build-dialog-sa…
Browse files Browse the repository at this point in the history
…ve-window-geometry

Save geometry of expression build dialog on close
  • Loading branch information
NathanW2 committed Jan 28, 2013
2 parents 958cd2a + 4cd271b commit 1e34b2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/gui/qgsexpressionbuilderdialog.cpp
Expand Up @@ -47,11 +47,10 @@ QString QgsExpressionBuilderDialog::expressionText()
return builder->expressionText();
}

void QgsExpressionBuilderDialog::closeEvent( QCloseEvent *event )
void QgsExpressionBuilderDialog::done( int r )
{
QDialog::closeEvent( event );
QDialog::done( r );

// TODO Work out why this is not working yet.
QSettings settings;
settings.setValue( "/Windows/ExpressionBuilderDialog/geometry", saveGeometry() );
}
Expand Down
8 changes: 5 additions & 3 deletions src/gui/qgsexpressionbuilderdialog.h
Expand Up @@ -42,10 +42,12 @@ class GUI_EXPORT QgsExpressionBuilderDialog : public QDialog, private Ui::QgsExp

protected:
/**
* Handle closing of the window
* @param event unused
* Is called when the dialog get accepted or rejected
* Used to save geometry
*
* @param r result value (unused)
*/
void closeEvent( QCloseEvent * event );
virtual void done( int r );
};

#endif

0 comments on commit 1e34b2f

Please sign in to comment.