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.
This commit is contained in:
Rémi Verschelde 2020-03-05 15:33:01 +01:00
parent 5ea8b1692a
commit fdda39a506
4 changed files with 12 additions and 11 deletions

View file

@ -29,6 +29,7 @@
/*************************************************************************/
#include "editor_inspector.h"
#include "array_property_edit.h"
#include "dictionary_property_edit.h"
#include "editor_feature_profile.h"
@ -1358,7 +1359,7 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, Ref<Edit
if (ep) {
ep->object = object;
ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed), make_binds(StringName(), false));
ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed));
ep->connect("property_keyed", callable_mp(this, &EditorInspector::_property_keyed));
ep->connect("property_keyed_with_value", callable_mp(this, &EditorInspector::_property_keyed_with_value));
ep->connect("property_checked", callable_mp(this, &EditorInspector::_property_checked));
@ -1770,9 +1771,9 @@ void EditorInspector::update_tree() {
if (ep) {
ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed), make_binds(StringName(), false));
ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed));
if (p.usage & PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED) {
ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed_update_all), make_binds(StringName(), false), CONNECT_DEFERRED);
ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed_update_all), varray(), CONNECT_DEFERRED);
}
ep->connect("property_keyed", callable_mp(this, &EditorInspector::_property_keyed));
ep->connect("property_keyed_with_value", callable_mp(this, &EditorInspector::_property_keyed_with_value));