diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/dialog.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp index 523227a237..d0e5755a59 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -361,11 +361,11 @@ Widget *Dialog::findWidget(const char *name) { } void Dialog::removeWidget(Widget *del) { - if (del == _mouseWidget) + if (del == _mouseWidget || del->containsWidget(_mouseWidget)) _mouseWidget = NULL; - if (del == _focusedWidget) + if (del == _focusedWidget || del->containsWidget(_focusedWidget)) _focusedWidget = NULL; - if (del == _dragWidget) + if (del == _dragWidget || del->containsWidget(_dragWidget)) _dragWidget = NULL; GuiObject::removeWidget(del); |