Revert "Do not emit NOTIFICATION_READY more than once (breaking change)"

This reverts commit b6eab006db.

This commit broke compatibility in an undesired way, as outlined in
https://github.com/godotengine/godot/issues/3290#issuecomment-263388003
This commit is contained in:
Rémi Verschelde 2016-11-30 00:07:29 +01:00
parent ab637bc812
commit 440c37fbd9
2 changed files with 6 additions and 7 deletions

View file

@ -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;