diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-03-05 15:33:01 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-03-05 15:35:44 +0100 |
commit | fdda39a5061b6754204c34bc7e79ec7b4150bc79 (patch) | |
tree | cb7b739b8a70aaf23c9544eef8b806fb7f0be542 /editor/editor_properties_array_dict.h | |
parent | 5ea8b1692a8929861ecc52d6be208df60e2402ab (diff) | |
download | redot-engine-fdda39a5061b6754204c34bc7e79ec7b4150bc79.tar.gz |
Signals: Don't pass default binds to EditorProperty property_changed
This was done by mistake in #36758, but it's not necessary and actual
causes a bug.
`property_changed` is only emitted via `emit_changed()`, which already
has default values for `p_field` and `p_changing`.
Also reverted to using `String` for now to be on the safe side, even if
it's inconsistent with `emit_changed()`. I had only changed it
partially in #36758 so it was inconsistent. It probably does make sense
to port `EditorInspector` and related property editors to use
`StringName` where relevant, but that's for a dedicated PR.
Fixes #36799.
Diffstat (limited to 'editor/editor_properties_array_dict.h')
-rw-r--r-- | editor/editor_properties_array_dict.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_properties_array_dict.h b/editor/editor_properties_array_dict.h index 3850cf0c6b..51a4be1b3a 100644 --- a/editor/editor_properties_array_dict.h +++ b/editor/editor_properties_array_dict.h @@ -100,7 +100,7 @@ class EditorPropertyArray : public EditorProperty { void _page_changed(double p_page); void _length_changed(double p_page); void _edit_pressed(); - void _property_changed(const String &p_property, Variant p_value, const StringName &p_name = StringName(), bool p_changing = false); + void _property_changed(const String &p_property, Variant p_value, const String &p_name = "", bool p_changing = false); void _change_type(Object *p_button, int p_index); void _change_type_menu(int p_index); @@ -135,7 +135,7 @@ class EditorPropertyDictionary : public EditorProperty { void _page_changed(double p_page); void _edit_pressed(); - void _property_changed(const String &p_property, Variant p_value, const StringName &p_name = StringName(), bool p_changing = false); + void _property_changed(const String &p_property, Variant p_value, const String &p_name = "", bool p_changing = false); void _change_type(Object *p_button, int p_index); void _change_type_menu(int p_index); |