aboutsummaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-03-18 22:40:20 +0800
committercrupest <crupest@outlook.com>2020-03-18 22:40:20 +0800
commitbfd277f9f621931a1c6ea05ea2cd6d04455cfe67 (patch)
tree0fed9243fac2efd78d4aa522ebf483abf7df637d /src/ui
parent477155d6fccc8eafadb6d7f4c468c9141d7d4e92 (diff)
downloadcru-bfd277f9f621931a1c6ea05ea2cd6d04455cfe67.tar.gz
cru-bfd277f9f621931a1c6ea05ea2cd6d04455cfe67.tar.bz2
cru-bfd277f9f621931a1c6ea05ea2cd6d04455cfe67.zip
...
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/controls/container.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ui/controls/container.cpp b/src/ui/controls/container.cpp
index 2075d4ba..4695ad4c 100644
--- a/src/ui/controls/container.cpp
+++ b/src/ui/controls/container.cpp
@@ -9,5 +9,10 @@ Container::Container() {
render_object_->SetBorderEnabled(false);
}
-Container::~Container() {}
+Container::~Container() = default;
+
+void Container::OnChildChanged(Control* old_child, Control* new_child) {
+ render_object_->RemoveChild(0);
+ render_object_->AddChild(new_child->GetRenderObject(), 0);
+}
} // namespace cru::ui::controls