Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent infinite recursion in first _draw #97328

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions scene/main/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ void Node::_notification(int p_notification) {
}
#endif

if (data.auto_translate_mode != AUTO_TRANSLATE_MODE_DISABLED) {
notification(NOTIFICATION_TRANSLATION_CHANGED);
}

if (data.input) {
add_to_group("_vp_input" + itos(get_viewport()->get_instance_id()));
}
Expand All @@ -147,6 +143,12 @@ void Node::_notification(int p_notification) {
}
} break;

case NOTIFICATION_POST_ENTER_TREE: {
if (data.auto_translate_mode != AUTO_TRANSLATE_MODE_DISABLED) {
notification(NOTIFICATION_TRANSLATION_CHANGED);
}
} break;

case NOTIFICATION_EXIT_TREE: {
ERR_FAIL_NULL(get_viewport());
ERR_FAIL_NULL(get_tree());
Expand Down