You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Mark node groups as dirty for every children if parent is moved
This commit is contained in:
@@ -384,11 +384,7 @@ void Node::_move_child(Node *p_child, int p_pos, bool p_ignore_end) {
|
||||
for (int i = motion_from; i <= motion_to; i++) {
|
||||
data.children[i]->notification(NOTIFICATION_MOVED_IN_PARENT);
|
||||
}
|
||||
for (const KeyValue<StringName, GroupData> &E : p_child->data.grouped) {
|
||||
if (E.value.group) {
|
||||
E.value.group->changed = true;
|
||||
}
|
||||
}
|
||||
p_child->_propagate_groups_dirty();
|
||||
|
||||
data.blocked--;
|
||||
}
|
||||
@@ -408,6 +404,18 @@ void Node::raise() {
|
||||
}
|
||||
}
|
||||
|
||||
void Node::_propagate_groups_dirty() {
|
||||
for (const KeyValue<StringName, GroupData> &E : data.grouped) {
|
||||
if (E.value.group) {
|
||||
E.value.group->changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < data.children.size(); i++) {
|
||||
data.children[i]->_propagate_groups_dirty();
|
||||
}
|
||||
}
|
||||
|
||||
void Node::add_child_notify(Node *p_child) {
|
||||
// to be used when not wanted
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user