GUI: child windows will no long be removed on parent destroy. listbox/window now...
[enigma2.git] / lib / gui / ewidget.cpp
index 023caa6a7e90341c4c3c6c0739a25da673835c5f..6f7fa91b30c40b3a895d6a94c0ae7634383c5158 100644 (file)
@@ -205,12 +205,11 @@ eWidget::~eWidget()
 
        m_parent = 0;
 
-               /* destroy all childs */
+               /* tell all childs that the parent is not anymore existing */
        ePtrList<eWidget>::iterator i(m_childs.begin());
        while (i != m_childs.end())
        {
-               (*i)->m_parent = 0;
-               delete *i;
+               (*i)->parentRemoved();
                i = m_childs.erase(i);
        }
 }
@@ -275,6 +274,11 @@ void eWidget::recalcClipRegionsWhenVisible()
        } while(1);
 }
 
+void eWidget::parentRemoved()
+{
+       m_parent = 0;
+}
+
 int eWidget::event(int event, void *data, void *data2)
 {
        switch (event)