summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorMichael Alexsander <michaelalexsander@protonmail.com>2019-12-24 13:01:26 -0300
committerMichael Alexsander <michaelalexsander@protonmail.com>2020-11-08 11:48:50 -0300
commit4f08174413db7ef20d49123e898758bef9561833 (patch)
tree418bf69d6ff93f99b51df33947353575a82ecd04 /core
parent4206dc6ac95bed86d8f8d040a0e1b73431cdb750 (diff)
Make translation change notification when setting the locale of a Translation resource only happen when loaded in the server
Diffstat (limited to 'core')
-rw-r--r--core/string/translation.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}
}