diff options
author | kobewi <kobewi4e@gmail.com> | 2023-03-17 01:58:30 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2023-03-22 23:57:12 +0100 |
commit | 8f8178bda6d74e09283df85d4cb34a52843e1892 (patch) | |
tree | 074fa921a80ff53da77c6f474c598a372665e0da /scene/main/window.cpp | |
parent | 0291fcd7b66bcb315a49c44de8031e5596de4216 (diff) | |
download | redot-engine-8f8178bda6d74e09283df85d4cb34a52843e1892.tar.gz |
Fix auto-translations in editor
Diffstat (limited to 'scene/main/window.cpp')
-rw-r--r-- | scene/main/window.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp index 5d3173a2a5..1ac6827158 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -490,7 +490,7 @@ bool Window::is_embedded() const { bool Window::is_in_edited_scene_root() const { #ifdef TOOLS_ENABLED - return (Engine::get_singleton()->is_editor_hint() && get_tree()->get_edited_scene_root() && (get_tree()->get_edited_scene_root()->is_ancestor_of(this) || get_tree()->get_edited_scene_root() == this)); + return is_part_of_edited_scene(); #else return false; #endif @@ -1138,6 +1138,13 @@ void Window::_notification(int p_what) { RS::get_singleton()->viewport_set_active(get_viewport_rid(), true); } +#ifdef TOOLS_ENABLED + if (is_part_of_edited_scene()) { + // Don't translate Windows on scene when inside editor. + set_message_translation(false); + notification(NOTIFICATION_TRANSLATION_CHANGED); + } +#endif notification(NOTIFICATION_THEME_CHANGED); } break; |