repeat that last fix for all menus

This commit is contained in:
darkrose 2014-11-01 04:35:39 +10:00
parent ad1848a27b
commit 46f4013bac
5 changed files with 18 additions and 46 deletions

View File

@ -50,15 +50,10 @@ void GUIDeathScreen::removeChildren()
{
const core::list<gui::IGUIElement*> &children = getChildren();
core::list<gui::IGUIElement*> children_copy;
for(core::list<gui::IGUIElement*>::ConstIterator
i = children.begin(); i != children.end(); i++)
{
for (core::list<gui::IGUIElement*>::ConstIterator i = children.begin(); i != children.end(); i++) {
children_copy.push_back(*i);
}
for(core::list<gui::IGUIElement*>::Iterator
i = children_copy.begin();
i != children_copy.end(); i++)
{
for (core::list<gui::IGUIElement*>::Iterator i = children_copy.begin(); i != children_copy.end(); i++) {
(*i)->remove();
}
}

View File

@ -49,14 +49,10 @@ void GUIKeyChangeMenu::removeChildren()
{
const core::list<gui::IGUIElement*> &children = getChildren();
core::list<gui::IGUIElement*> children_copy;
for (core::list<gui::IGUIElement*>::ConstIterator i = children.begin(); i
!= children.end(); i++)
{
for (core::list<gui::IGUIElement*>::ConstIterator i = children.begin(); i != children.end(); i++) {
children_copy.push_back(*i);
}
for (core::list<gui::IGUIElement*>::Iterator i = children_copy.begin(); i
!= children_copy.end(); i++)
{
for (core::list<gui::IGUIElement*>::Iterator i = children_copy.begin(); i != children_copy.end(); i++) {
(*i)->remove();
}
}

View File

@ -68,15 +68,10 @@ void GUIMainMenu::removeChildren()
{
const core::list<gui::IGUIElement*> &children = getChildren();
core::list<gui::IGUIElement*> children_copy;
for(core::list<gui::IGUIElement*>::ConstIterator
i = children.begin(); i != children.end(); i++)
{
for (core::list<gui::IGUIElement*>::ConstIterator i = children.begin(); i != children.end(); i++) {
children_copy.push_back(*i);
}
for(core::list<gui::IGUIElement*>::Iterator
i = children_copy.begin();
i != children_copy.end(); i++)
{
for (core::list<gui::IGUIElement*>::Iterator i = children_copy.begin(); i != children_copy.end(); i++) {
(*i)->remove();
}
}

View File

@ -52,25 +52,13 @@ GUIPasswordChange::~GUIPasswordChange()
void GUIPasswordChange::removeChildren()
{
{
gui::IGUIElement *e = getElementFromId(ID_oldPassword);
if(e != NULL)
e->remove();
const core::list<gui::IGUIElement*> &children = getChildren();
core::list<gui::IGUIElement*> children_copy;
for (core::list<gui::IGUIElement*>::ConstIterator i = children.begin(); i != children.end(); i++) {
children_copy.push_back(*i);
}
{
gui::IGUIElement *e = getElementFromId(ID_newPassword1);
if(e != NULL)
e->remove();
}
{
gui::IGUIElement *e = getElementFromId(ID_newPassword2);
if(e != NULL)
e->remove();
}
{
gui::IGUIElement *e = getElementFromId(ID_change);
if(e != NULL)
e->remove();
for (core::list<gui::IGUIElement*>::Iterator i = children_copy.begin(); i != children_copy.end(); i++) {
(*i)->remove();
}
}

View File

@ -51,15 +51,13 @@ GUITextInputMenu::~GUITextInputMenu()
void GUITextInputMenu::removeChildren()
{
{
gui::IGUIElement *e = getElementFromId(256);
if (e != NULL)
e->remove();
const core::list<gui::IGUIElement*> &children = getChildren();
core::list<gui::IGUIElement*> children_copy;
for (core::list<gui::IGUIElement*>::ConstIterator i = children.begin(); i != children.end(); i++) {
children_copy.push_back(*i);
}
{
gui::IGUIElement *e = getElementFromId(257);
if (e != NULL)
e->remove();
for (core::list<gui::IGUIElement*>::Iterator i = children_copy.begin(); i != children_copy.end(); i++) {
(*i)->remove();
}
}