diff options
| author | Rémi Verschelde | 2016-11-30 00:07:29 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2016-11-30 00:08:01 +0100 |
| commit | 440c37fbd93eb26dd7da6c498ed39ca5f3fe7f7b (patch) | |
| tree | cecee88b70f582f62742608b4aed8c9fa2c0fb51 /scene/main/node.cpp | |
| parent | ab637bc81285a3b7bf800d507370d087d44d7145 (diff) | |
| download | godot-440c37fbd93eb26dd7da6c498ed39ca5f3fe7f7b.tar.gz godot-440c37fbd93eb26dd7da6c498ed39ca5f3fe7f7b.tar.zst godot-440c37fbd93eb26dd7da6c498ed39ca5f3fe7f7b.zip | |
Diffstat (limited to 'scene/main/node.cpp')
| -rw-r--r-- | scene/main/node.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 78a5cb730..bff3c3a08 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -166,16 +166,14 @@ void Node::_notification(int p_notification) { void Node::_propagate_ready() { + data.ready_notified=true; data.blocked++; for (int i=0;i<data.children.size();i++) { data.children[i]->_propagate_ready(); } data.blocked--; - if(!data.ready_notified) { - data.ready_notified=true; - notification(NOTIFICATION_READY); - } + notification(NOTIFICATION_READY); } @@ -2665,7 +2663,9 @@ void Node::_set_tree(SceneTree *p_tree) { _propagate_enter_tree(); - _propagate_ready(); //reverse_notification(NOTIFICATION_READY); + if (!data.parent || data.parent->data.ready_notified) { // No parent (root) or parent ready + _propagate_ready(); //reverse_notification(NOTIFICATION_READY); + } tree_changed_b=data.tree; |
