diff options
Diffstat (limited to 'src/gui/widgets/textfield.cpp')
-rw-r--r-- | src/gui/widgets/textfield.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index 0d7b3d883..c7b9cd312 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -797,3 +797,16 @@ void TextField::setParent(Widget *widget) mWindow->addWidgetListener(this); Widget::setParent(widget); } + +void TextField::setWindow(Widget *const widget) +{ + if (!widget && mWindow) + { + mWindow->removeWidgetListener(this); + mWindow = nullptr; + } + else + { + Widget2::setWindow(widget); + } +} |