Fix for good CGUIEditBox leak
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9991 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
a8dfd29f65
commit
f56e8d85ec
@ -148,25 +148,16 @@ ModalDialog::~ModalDialog()
|
||||
|
||||
void ModalDialog::clearWindow()
|
||||
{
|
||||
// TODO: extract this code and its eqauivalent from Screen into the common base class?
|
||||
Widget* w;
|
||||
for_in (w, m_widgets)
|
||||
{
|
||||
m_irrlicht_window->removeChild( w->getIrrlichtElement() );
|
||||
}
|
||||
elementsWereDeleted();
|
||||
m_widgets.clearAndDeleteAll();
|
||||
|
||||
m_irrlicht_window->remove();
|
||||
m_irrlicht_window = GUIEngine::getGUIEnv()->addWindow ( m_area, true /* modal */ );
|
||||
|
||||
/*
|
||||
const core::list<IGUIElement*>& remainingChildren = m_irrlicht_window->getChildren();
|
||||
const int amount = remainingChildren.getSize();
|
||||
for(core::list<IGUIElement*>::Iterator it=remainingChildren.begin(); it != remainingChildren.end(); it++)
|
||||
{
|
||||
it->remove();
|
||||
}
|
||||
*/
|
||||
m_irrlicht_window = GUIEngine::getGUIEnv()->addWindow( m_area, true /* modal */ );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user