瀏覽代碼

prevent nested packedArray from being casted to generic Arrays

ajreckof 2 年之前
父節點
當前提交
1557a37703
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      editor/editor_properties_array_dict.cpp

+ 1 - 2
editor/editor_properties_array_dict.cpp

@@ -203,8 +203,7 @@ void EditorPropertyArray::_property_changed(const String &p_property, Variant p_
 		index = p_property.get_slice("/", 1).to_int();
 	}
 
-	Array array;
-	array.assign(object->get_array().duplicate());
+	Variant array = object->get_array().duplicate();
 	array.set(index, p_value);
 	object->set_array(array);
 	emit_changed(get_edited_property(), array, "", true);