Merge pull request #17321 from LinkDoyle/issue_16350
Fix switching WindowDialog types leaves garbage buttons
This commit is contained in:
commit
01bb39ac3f
1 changed files with 4 additions and 1 deletions
|
@ -2502,8 +2502,11 @@ void Node::replace_by(Node *p_node, bool p_keep_data) {
|
|||
|
||||
Node *child = get_child(0);
|
||||
remove_child(child);
|
||||
if (!child->is_owned_by_parent()) {
|
||||
// add the custom children to the p_node
|
||||
p_node->add_child(child);
|
||||
}
|
||||
}
|
||||
|
||||
p_node->set_owner(owner);
|
||||
for (int i = 0; i < owned.size(); i++)
|
||||
|
|
Loading…
Reference in a new issue