fixed user settings not being saved when last document window is closed while user settings window is still open

openmw-38
Marc Zinnschlag 9 years ago
parent d6bd2cb1f0
commit be19da189a

@ -71,6 +71,12 @@ CSVPrefs::Dialogue::Dialogue()
buildContentArea (main); buildContentArea (main);
} }
CSVPrefs::Dialogue::~Dialogue()
{
if (isVisible())
CSMPrefs::State::get().save();
}
void CSVPrefs::Dialogue::closeEvent (QCloseEvent *event) void CSVPrefs::Dialogue::closeEvent (QCloseEvent *event)
{ {
QMainWindow::closeEvent (event); QMainWindow::closeEvent (event);

@ -31,6 +31,8 @@ namespace CSVPrefs
Dialogue(); Dialogue();
virtual ~Dialogue();
protected: protected:
void closeEvent (QCloseEvent *event); void closeEvent (QCloseEvent *event);

Loading…
Cancel
Save