diff options
Diffstat (limited to 'include/cru/ui/controls/SingleChildControl.h')
-rw-r--r-- | include/cru/ui/controls/SingleChildControl.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/cru/ui/controls/SingleChildControl.h b/include/cru/ui/controls/SingleChildControl.h index 037d6dd3..d40d7a27 100644 --- a/include/cru/ui/controls/SingleChildControl.h +++ b/include/cru/ui/controls/SingleChildControl.h @@ -48,8 +48,14 @@ class CRU_UI_API SingleChildControl : public Control { } } + void RemoveChild(Control* child) override { + if (child_ == child) { + SetChild(nullptr); + } + } + private: - Control* child_; + Control* child_ = nullptr; std::unique_ptr<TRenderObject> container_render_object_; }; } // namespace cru::ui::controls |