Skip to content

Commit

Permalink
Save geometry of expression build dialog on close
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jan 25, 2013
1 parent 3f024e1 commit 4cd271b
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 4cd271b

Please sign in to comment.