diff options
author | Rindbee <idleman@yeah.net> | 2022-07-11 10:13:34 +0800 |
---|---|---|
committer | Rindbee <idleman@yeah.net> | 2022-07-11 10:38:34 +0800 |
commit | b6fdd0815c2448b3858746f6655d8a6cd3a763f4 (patch) | |
tree | 5882cbdaa182a28060b7fbfb634e2debfaf1e9f6 /editor | |
parent | d26442e709f6361af9ac755ec9291bb43f2cd69b (diff) |
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.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_properties.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index d06d22ae5b..8044359369 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -1670,7 +1670,7 @@ void EditorPropertyVector2::_value_changed(double val, const String &p_name) { Vector2 v2; v2.x = spin[0]->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() { @@ -1917,7 +1917,7 @@ void EditorPropertyVector3::_value_changed(double val, const String &p_name) { v3.y = Math::deg2rad(v3.y); v3.z = Math::deg2rad(v3.z); } - emit_changed(get_edited_property(), v3, p_name); + emit_changed(get_edited_property(), v3, linked->is_pressed() ? "" : p_name); } void EditorPropertyVector3::update_property() { @@ -2083,7 +2083,7 @@ void EditorPropertyVector2i::_value_changed(double val, const String &p_name) { Vector2i v2; v2.x = spin[0]->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 EditorPropertyVector2i::update_property() { @@ -2325,7 +2325,7 @@ void EditorPropertyVector3i::_value_changed(double val, const String &p_name) { v3.x = spin[0]->get_value(); v3.y = spin[1]->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 EditorPropertyVector3i::update_property() { |