diff --git a/plugins/grass/qgsgrassedit.cpp b/plugins/grass/qgsgrassedit.cpp index 02f6b35f733..065ade57a72 100644 --- a/plugins/grass/qgsgrassedit.cpp +++ b/plugins/grass/qgsgrassedit.cpp @@ -15,6 +15,7 @@ ***************************************************************************/ #include #include +#include #include #include #include @@ -684,11 +685,22 @@ void QgsGrassEdit::closeEdit(void) mProvider->closeEdit(); - close(); + hide(); delete this; } +void QgsGrassEdit::closeEvent(QCloseEvent *e) +{ + #ifdef QGISDEBUG + std::cerr << "QgsGrassEdit::closeEvent()" << std::endl; + #endif + + e->accept(); + + closeEdit(); +} + void QgsGrassEdit::catModeChanged ( void ) { int mode = mCatModeBox->currentItem(); diff --git a/plugins/grass/qgsgrassedit.h b/plugins/grass/qgsgrassedit.h index 0957c641861..0448652e0e5 100644 --- a/plugins/grass/qgsgrassedit.h +++ b/plugins/grass/qgsgrassedit.h @@ -19,6 +19,7 @@ #include class QString; +class QCloseEvent; #include #include @@ -168,6 +169,9 @@ public slots: // The type of column was changed void columnTypeChanged ( int row, int col ); + // ! Close event + void closeEvent(QCloseEvent *e); + private: //! Editing is already running static bool mRunning;