From 6d4df09b313df5a7debf5267f3aff0f23ae74485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Teuli=C3=A8re?= Date: Sat, 5 May 2012 19:45:04 +0200 Subject: [PATCH] Fixed a bug when saving the position of auxiliary windows --- qt/aux_window.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qt/aux_window.cpp b/qt/aux_window.cpp index f478d54..b215e1c 100644 --- a/qt/aux_window.cpp +++ b/qt/aux_window.cpp @@ -88,6 +88,10 @@ void AuxWindow::closeEvent(QCloseEvent *event) void AuxWindow::writeSettings() const { + // For some reason, this method is called when the window is destroyed, + // even when it was already closed. So avoid saving an invalid position. + if (!isVisible()) + return; QSettings settings; settings.beginGroup(m_windowName); settings.setValue("size", size());