Skip to content

Commit

Permalink
Merge pull request #23564 from endragor/fix-remove-child-ordering
Browse files Browse the repository at this point in the history
Notify node's moved children after sibling removed
  • Loading branch information
reduz authored Nov 14, 2018
2 parents 16022da + 3b02cd3 commit c5656b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scene/main/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,7 @@ void Node::remove_child(Node *p_child) {
for (int i = idx; i < data.children.size(); i++) {

data.children[i]->data.pos = i;
data.children[i]->notification(NOTIFICATION_MOVED_IN_PARENT);
}

p_child->data.parent = NULL;
Expand Down

0 comments on commit c5656b7

Please sign in to comment.