浏览代码

Fix property link not working in MultiNodeEdit

This is due to the `p_field` in the `EditorProperty::emit_changed`.
`p_field` only works for `MultiNodeEdit`, not for other objects.

(cherry picked from commit b6fdd0815c2448b3858746f6655d8a6cd3a763f4)
Rindbee 3 年之前
父节点
当前提交
9056cc9c2a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      editor/editor_properties.cpp

+ 2 - 2
editor/editor_properties.cpp

@@ -1524,7 +1524,7 @@ void EditorPropertyVector2::_value_changed(double val, const String &p_name) {
 	Vector2 v2;
 	Vector2 v2;
 	v2.x = spin[0]->get_value();
 	v2.x = spin[0]->get_value();
 	v2.y = spin[1]->get_value();
 	v2.y = spin[1]->get_value();
-	emit_changed(get_edited_property(), v2, p_name);
+	emit_changed(get_edited_property(), v2, linked->is_pressed() ? "" : p_name);
 }
 }
 
 
 void EditorPropertyVector2::update_property() {
 void EditorPropertyVector2::update_property() {
@@ -1746,7 +1746,7 @@ void EditorPropertyVector3::_value_changed(double val, const String &p_name) {
 	v3.x = spin[0]->get_value();
 	v3.x = spin[0]->get_value();
 	v3.y = spin[1]->get_value();
 	v3.y = spin[1]->get_value();
 	v3.z = spin[2]->get_value();
 	v3.z = spin[2]->get_value();
-	emit_changed(get_edited_property(), v3, p_name);
+	emit_changed(get_edited_property(), v3, linked->is_pressed() ? "" : p_name);
 }
 }
 
 
 void EditorPropertyVector3::update_property() {
 void EditorPropertyVector3::update_property() {