From: Enar Väikene Date: Fri, 8 Nov 2013 06:28:04 +0000 (+0200) Subject: Removing destroyed panels also from the list of minimized windows. X-Git-Url: https://vaikene.ee/gitweb/index.html?a=commitdiff_plain;h=2c47d556b83e0c1a3e80ec2310b6b9ac1c688974;p=evaf Removing destroyed panels also from the list of minimized windows. --- 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; }