diff options
Diffstat (limited to 'src/gui/widgets/checkbox.cpp')
-rw-r--r-- | src/gui/widgets/checkbox.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp index 20a58bdf1..f7dbf3526 100644 --- a/src/gui/widgets/checkbox.cpp +++ b/src/gui/widgets/checkbox.cpp @@ -322,3 +322,16 @@ void CheckBox::widgetHidden(const Event &event A_UNUSED) mTextChanged = true; mTextChunk.deleteImage(); } + +void CheckBox::setWindow(Widget *const widget) +{ + if (!widget && mWindow) + { + mWindow->removeWidgetListener(this); + mWindow = nullptr; + } + else + { + Widget2::setWindow(widget); + } +} |