X-Git-Url: https://vaikene.ee/gitweb/pswgen11.html?a=blobdiff_plain;f=src%2Fplugins%2FSdiWindow%2Fsdiwindow.cpp;h=c6e1de294320c5b6797bb1424dca1ae99dc6364a;hb=36bd93cf4263b118366b3db2d26e8efb1ac1b690;hp=eb1a449ab3f84dc6884972f3da38e0a82481da4f;hpb=0c61450fcffcb36a6e23ca5b083c26543d956084;p=evaf
diff --git a/src/plugins/SdiWindow/sdiwindow.cpp b/src/plugins/SdiWindow/sdiwindow.cpp
index eb1a449..c6e1de2 100644
--- a/src/plugins/SdiWindow/sdiwindow.cpp
+++ b/src/plugins/SdiWindow/sdiwindow.cpp
@@ -53,6 +53,7 @@ SdiWindow::iSdiWindow * SdiWindow::iSdiWindow::instance()
SdiWindow::Internal::MainWindow::MainWindow(QWidget * parent, Qt::WindowFlags flags)
: QWidget(parent, flags)
, mReady(false)
+ , mMainPanel(0)
{
setObjectName(QString("%1-%2").arg(VER_MODULE_NAME_STR).arg(__FUNCTION__));
@@ -291,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
{
@@ -305,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;
}