NDK/BaseWidget: Children widgets are now automatically parented to their parent

This commit is contained in:
Lynix 2017-02-23 00:09:39 +01:00
parent 8d402f0491
commit 55d9a22665
1 changed files with 1 additions and 0 deletions

View File

@ -33,6 +33,7 @@ namespace Ndk
inline void BaseWidget::AddChild(std::unique_ptr<BaseWidget>&& widget) inline void BaseWidget::AddChild(std::unique_ptr<BaseWidget>&& widget)
{ {
widget->Show(m_visible); widget->Show(m_visible);
widget->SetParent(this);
m_children.emplace_back(std::move(widget)); m_children.emplace_back(std::move(widget));
} }