瀏覽代碼

Merge pull request #102585 from KoBeWi/localichangetion

Don't send `TRANSLATION_CHANGED` outside tree
Thaddeus Crews 5 月之前
父節點
當前提交
e23460ae78
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      scene/main/node.cpp

+ 4 - 1
scene/main/node.cpp

@@ -1378,7 +1378,10 @@ void Node::_propagate_translation_domain_dirty() {
 			child->_propagate_translation_domain_dirty();
 		}
 	}
-	notification(NOTIFICATION_TRANSLATION_CHANGED);
+
+	if (is_inside_tree() && data.auto_translate_mode != AUTO_TRANSLATE_MODE_DISABLED) {
+		notification(NOTIFICATION_TRANSLATION_CHANGED);
+	}
 }
 
 StringName Node::get_name() const {