]> vaikene.ee Git - evaf/blobdiff - src/plugins/SdiWindow/sdiwindow.cpp
Removing destroyed panels also from the list of minimized windows.
[evaf] / src / plugins / SdiWindow / sdiwindow.cpp
index 5956276b3add6f79abb0a9c05a0691bd777d7697..c6e1de294320c5b6797bb1424dca1ae99dc6364a 100644 (file)
@@ -292,6 +292,20 @@ void SdiWindow::Internal::MainWindow::panelDestroyed(QObject * obj)
             }
         }
     }
+    {
+        QVector<Gui::Panel *>::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;
     }