Update label parent in button
This commit is contained in:
parent
8feb15fc5c
commit
e6b731f5d7
1 changed files with 3 additions and 0 deletions
|
|
@ -67,8 +67,11 @@ namespace psemek::ui
|
|||
|
||||
void button::set_label(std::shared_ptr<struct label> label)
|
||||
{
|
||||
if (label_) label_->set_parent(nullptr);
|
||||
|
||||
label_ = std::move(label);
|
||||
children_[0] = label_.get();
|
||||
if (label_) label_->set_parent(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue