summaryrefslogtreecommitdiff
path: root/core/string/translation.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-03-22 23:30:20 +0100
committerGitHub <noreply@github.com>2021-03-22 23:30:20 +0100
commit8fb382afb8643d38e14dccd38db119db4d6c6e48 (patch)
tree50f70dc86e66af324dd00322e747afd444e43867 /core/string/translation.cpp
parenta7fb5f8558d69e4f2e66afc2e32174e501c67555 (diff)
parent4f08174413db7ef20d49123e898758bef9561833 (diff)
Merge pull request #34587 from YeldhamDev/translation_resource_notification_removal
Remove translation change notification when setting the locale of a Translation resource
Diffstat (limited to 'core/string/translation.cpp')
-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 9cee218735..ade5f7b4d8 100644
--- a/core/string/translation.cpp
+++ b/core/string/translation.cpp
@@ -853,7 +853,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);
}
}