-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Fix auto-translations in editor #75012
Conversation
Right. Wouldn't it also trigger in projects whenever you have multiple Window nodes or controls inside of windows, dialogs, or popups? I think a |
No this PR affects only the editor. False-positives is about nodes that are part of the editor, but get detected as scene nodes and don't not translated. It can happen if some node is not part of the main viewport. |
Ah, right, you guard with |
51ebcef
to
dd0d220
Compare
Ok added TOOLS_ENABLED check. |
Similar conditions are already used in several other nodes ;) Line 38 in ce90d77
Line 252 in ce90d77
I think we can turn this logic into a method of |
dd0d220
to
8f8178b
Compare
I added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, such a beauty is gone now, packed inside of a neat new method.
Thanks! |
This PR enables auto-translation of Windows and Controls inside the editor, if they are not part of the edited scene.
Fixes #50650
Technically
TTR()
can now be retired in favor ofTTRC()
, probably.I use
get_viewport() != get_tree()->get_root()
to determine whether a node is part of the scene tree, but this might yield some false-positives. A more reliable condition isand for Window
but not sure if it's necessary 🤔