Skip to content
Permalink
Browse files
Save geometry of expression build dialog on close
  • Loading branch information
m-kuhn committed Jan 25, 2013
1 parent 3f024e1 commit 4cd271bd714c0e447e4a81df52d8b005f7efa1f2
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 4cd271b

Please sign in to comment.