From 2c47d556b83e0c1a3e80ec2310b6b9ac1c688974 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Enar=20V=C3=A4ikene?= Date: Fri, 8 Nov 2013 08:28:04 +0200 Subject: [PATCH] Removing destroyed panels also from the list of minimized windows. --- src/plugins/SdiWindow/sdiwindow.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/plugins/SdiWindow/sdiwindow.cpp b/src/plugins/SdiWindow/sdiwindow.cpp index 5956276..c6e1de2 100644 --- a/src/plugins/SdiWindow/sdiwindow.cpp +++ b/src/plugins/SdiWindow/sdiwindow.cpp @@ -292,6 +292,20 @@ void SdiWindow::Internal::MainWindow::panelDestroyed(QObject * obj) } } } + { + QVector::iterator it = mMinimizedPanels.begin(); + while (it != mMinimizedPanels.end()) + { + if (*it == obj) + { + it = mMinimizedPanels.erase(it); + } + else + { + ++it; + } + } + } // Do the same with panel names { @@ -306,6 +320,7 @@ void SdiWindow::Internal::MainWindow::panelDestroyed(QObject * obj) } } + // If it was the main panel, set the main panel to NULL if (mMainPanel == obj) { mMainPanel = 0; } -- 2.47.0