Skip to content
Permalink
Browse files
Merge pull request #403 from matthias-kuhn/expression-build-dialog-sa…
…ve-window-geometry

Save geometry of expression build dialog on close
  • Loading branch information
NathanW2 committed Jan 28, 2013
2 parents 958cd2a + 4cd271b commit 1e34b2f331ded056e4d1c3aa4f0126c8c880c65c
Showing with 7 additions and 6 deletions.
  1. +2 −3 src/gui/qgsexpressionbuilderdialog.cpp
  2. +5 −3 src/gui/qgsexpressionbuilderdialog.h
@@ -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() );
}
@@ -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.