Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Fix issue where PackedVector2Array and other packed vectors could not be edited from remote or multi node edit.

Kenneth6b696b7e5110
diff --git a/editor/debugger/editor_debugger_inspector.cpp b/editor/debugger/editor_debugger_inspector.cpp
index a76ee6703f3..7cb33bb4bdc 100644
--- a/editor/debugger/editor_debugger_inspector.cpp
+++ b/editor/debugger/editor_debugger_inspector.cpp
@@ -92,13 +92,7 @@ void EditorDebuggerRemoteObjects::_get_property_list(List<PropertyInfo> *p_list)
}
void EditorDebuggerRemoteObjects::set_property_field(const StringName &p_property, const Variant &p_value, const String &p_field) {
- // Ignore the field with arrays and dictionaries, as they are passed whole when edited.
- Variant::Type type = p_value.get_type();
- if (type == Variant::ARRAY || type == Variant::DICTIONARY) {
- _set_impl(p_property, p_value, "");
- } else {
- _set_impl(p_property, p_value, p_field);
- }
+ _set_impl(p_property, p_value, p_field);
}
String EditorDebuggerRemoteObjects::get_title() {
diff --git a/editor/inspector/editor_properties_array_dict.cpp b/editor/inspector/editor_properties_array_dict.cpp
index 4f51d25aefa..185a16cca49 100644
--- a/editor/inspector/editor_properties_array_dict.cpp
+++ b/editor/inspector/editor_properties_array_dict.cpp
@@ -284,7 +284,7 @@ void EditorPropertyArray::_property_changed(const String &p_property, Variant p_
Variant array = object->get_array().duplicate();
array.set(index, p_value);
- emit_changed(get_edited_property(), array, p_name, p_changing);
+ emit_changed(get_edited_property(), array, "", p_changing);
if (p_changing) {
object->set_array(array);
}
@@ -1070,7 +1070,7 @@ void EditorPropertyDictionary::_property_changed(const String &p_property, Varia
object->set(p_property, p_value);
bool new_item_or_key = !p_property.begins_with("indices");
- emit_changed(get_edited_property(), object->get_dict(), p_name, p_changing || new_item_or_key);
+ emit_changed(get_edited_property(), object->get_dict(), "", p_changing || new_item_or_key);
if (new_item_or_key) {
update_property();
}
diff --git a/editor/inspector/multi_node_edit.cpp b/editor/inspector/multi_node_edit.cpp
index 2261d5c912f..b34a42671e8 100644
--- a/editor/inspector/multi_node_edit.cpp
+++ b/editor/inspector/multi_node_edit.cpp
@@ -368,13 +368,7 @@ StringName MultiNodeEdit::get_edited_class_name() const {
}
void MultiNodeEdit::set_property_field(const StringName &p_property, const Variant &p_value, const String &p_field) {
- // Ignore the field with arrays and dictionaries, as they are passed whole when edited.
- Variant::Type type = p_value.get_type();
- if (type == Variant::ARRAY || type == Variant::DICTIONARY) {
- _set_impl(p_property, p_value, "");
- } else {
- _set_impl(p_property, p_value, p_field);
- }
+ _set_impl(p_property, p_value, p_field);
}
void MultiNodeEdit::_bind_methods() {