mirror of
https://github.com/godotengine/godot
synced 2024-09-05 11:18:27 +00:00
Fix typed array export... again
This commit is contained in:
parent
24cb43a874
commit
da8d6734fb
|
@ -203,7 +203,18 @@ void EditorPropertyArray::_property_changed(const String &p_property, Variant p_
|
||||||
index = p_property.get_slice("/", 1).to_int();
|
index = p_property.get_slice("/", 1).to_int();
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant array = object->get_array().duplicate();
|
Variant array;
|
||||||
|
const Variant &original_array = object->get_array();
|
||||||
|
|
||||||
|
if (original_array.get_type() == Variant::ARRAY) {
|
||||||
|
// Needed to preserve type of TypedArrays in meta pointer properties.
|
||||||
|
Array temp;
|
||||||
|
temp.assign(original_array.duplicate());
|
||||||
|
array = temp;
|
||||||
|
} else {
|
||||||
|
array = original_array.duplicate();
|
||||||
|
}
|
||||||
|
|
||||||
array.set(index, p_value);
|
array.set(index, p_value);
|
||||||
object->set_array(array);
|
object->set_array(array);
|
||||||
emit_changed(get_edited_property(), array, "", true);
|
emit_changed(get_edited_property(), array, "", true);
|
||||||
|
|
Loading…
Reference in a new issue