From 541422a4a28c873142af9bfc988468b3e9e05948 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 18 Jan 2019 13:01:24 -0300 Subject: [PATCH] Clean up and fix issues after merging #21701 , closes #21104 --- editor/editor_inspector.cpp | 17 +++-- editor/editor_inspector.h | 2 + editor/editor_properties.cpp | 74 +++++++++---------- editor/editor_properties_array_dict.cpp | 20 ++--- editor/editor_properties_array_dict.h | 4 +- .../animation_blend_tree_editor_plugin.cpp | 2 +- .../animation_blend_tree_editor_plugin.h | 2 +- editor/plugins/root_motion_editor_plugin.cpp | 4 +- .../plugins/visual_shader_editor_plugin.cpp | 4 +- editor/project_export.cpp | 2 +- editor/project_export.h | 2 +- 11 files changed, 71 insertions(+), 62 deletions(-) diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 2ced5fe106c..0e5fd3a9996 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -80,6 +80,11 @@ Size2 EditorProperty::get_minimum_size() const { return ms; } +void EditorProperty::emit_changed(const StringName &p_property, const Variant &p_value, const StringName &p_field, bool p_changing) { + + emit_signal("property_changed", p_property, p_value, p_field, p_changing); +} + void EditorProperty::_notification(int p_what) { if (p_what == NOTIFICATION_SORT_CHILDREN) { @@ -634,7 +639,7 @@ void EditorProperty::_gui_input(const Ref &p_event) { emit_signal("property_keyed", property, use_keying_next()); if (use_keying_next()) { - call_deferred("emit_signal", "property_changed", property, object->get(property).operator int64_t() + 1); + call_deferred("emit_changed", property, object->get(property).operator int64_t() + 1, "", false); call_deferred("update_property"); } } @@ -646,14 +651,14 @@ void EditorProperty::_gui_input(const Ref &p_event) { Node *node = Object::cast_to(object); if (node && EditorPropertyRevert::may_node_be_in_instance(node) && EditorPropertyRevert::get_instanced_node_original_property(node, property, vorig)) { - emit_signal("property_changed", property, vorig.duplicate(true)); + emit_changed(property, vorig.duplicate(true)); update_property(); return; } if (object->call("property_can_revert", property).operator bool()) { Variant rev = object->call("property_get_revert", property); - emit_signal("property_changed", property, rev); + emit_changed(property, rev); update_property(); return; } @@ -662,7 +667,7 @@ void EditorProperty::_gui_input(const Ref &p_event) { Ref