From 4f08174413db7ef20d49123e898758bef9561833 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Tue, 24 Dec 2019 13:01:26 -0300 Subject: Make translation change notification when setting the locale of a Translation resource only happen when loaded in the server --- core/string/translation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/string/translation.cpp b/core/string/translation.cpp index df8a26e5ce..96546b743c 100644 --- a/core/string/translation.cpp +++ b/core/string/translation.cpp @@ -835,7 +835,7 @@ void Translation::set_locale(const String &p_locale) { locale = univ_locale; } - if (OS::get_singleton()->get_main_loop()) { + if (OS::get_singleton()->get_main_loop() && TranslationServer::get_singleton()->get_loaded_locales().has(this)) { OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_TRANSLATION_CHANGED); } } -- cgit v1.2.3