diff options
Diffstat (limited to 'gui/dialog.cpp')
-rw-r--r-- | gui/dialog.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp index 2ec8641257..fd15ba5e09 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -75,7 +75,6 @@ int Dialog::runModal() { } void Dialog::open() { - _result = 0; _visible = true; g_gui.openDialog(this); @@ -335,25 +334,7 @@ void Dialog::removeWidget(Widget *del) { if (del == _dragWidget) _dragWidget = NULL; - Widget *w = _firstWidget; - - if (del == _firstWidget) { - Widget *del_next = del->_next; - del->_next = 0; - _firstWidget = del_next; - return; - } - - w = _firstWidget; - while (w) { - if (w->_next == del) { - Widget *del_next = del->_next; - del->_next = 0; - w->_next = del_next; - return; - } - w = w->_next; - } + GuiObject::removeWidget(del); } } // End of namespace GUI |