Skip to content

Commit 610f4a2

Browse files
committed
Merge pull request godotengine#97328 from AThousandShips/fix_recursive_draw
Prevent infinite recursion in first `_draw`
2 parents 53f5961 + ff6eea5 commit 610f4a2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scene/main/node.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,6 @@ void Node::_notification(int p_notification) {
120120
}
121121
#endif
122122

123-
if (data.auto_translate_mode != AUTO_TRANSLATE_MODE_DISABLED) {
124-
notification(NOTIFICATION_TRANSLATION_CHANGED);
125-
}
126-
127123
if (data.input) {
128124
add_to_group("_vp_input" + itos(get_viewport()->get_instance_id()));
129125
}
@@ -147,6 +143,12 @@ void Node::_notification(int p_notification) {
147143
}
148144
} break;
149145

146+
case NOTIFICATION_POST_ENTER_TREE: {
147+
if (data.auto_translate_mode != AUTO_TRANSLATE_MODE_DISABLED) {
148+
notification(NOTIFICATION_TRANSLATION_CHANGED);
149+
}
150+
} break;
151+
150152
case NOTIFICATION_EXIT_TREE: {
151153
ERR_FAIL_NULL(get_viewport());
152154
ERR_FAIL_NULL(get_tree());

0 commit comments

Comments
 (0)