]> vaikene.ee Git - evaf/commitdiff
Removing destroyed panels also from the list of minimized windows.
authorEnar Väikene <enar@vaikene.net>
Fri, 8 Nov 2013 06:28:04 +0000 (08:28 +0200)
committerEnar Väikene <enar@vaikene.net>
Fri, 8 Nov 2013 06:28:04 +0000 (08:28 +0200)
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;
     }