Browse Source

Merge pull request #34587 from YeldhamDev/translation_resource_notification_removal

Remove translation change notification when setting the locale of a Translation resource
Rémi Verschelde 4 năm trước cách đây
mục cha
commit
8fb382afb8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      core/string/translation.cpp

+ 1 - 1
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);
 	}
 }