NDK/BaseWidget: Children widgets are now automatically parented to their parent
This commit is contained in:
parent
8d402f0491
commit
55d9a22665
|
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue