mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-20 12:33:14 +00:00
Fix 3D layer current_object_id being sometimes wrong when loading pxo files
Previously, it was set to the size of the object_properties dictionary, but if the user has deleted objects, the object id would be higher than the size of the dictionary, since current_object_id never decreases.
This commit is contained in:
parent
cf55332f18
commit
09c3ea1c2a
1 changed files with 5 additions and 2 deletions
|
@ -186,8 +186,11 @@ func deserialize(dict: Dictionary) -> void:
|
|||
if typeof(object) != TYPE_STRING:
|
||||
return
|
||||
Global.convert_dictionary_values(objects_copy[object])
|
||||
object_properties[int(object)] = objects_copy[object]
|
||||
current_object_id = object_properties.size()
|
||||
var id := int(object)
|
||||
if current_object_id < id:
|
||||
current_object_id = id
|
||||
object_properties[id] = objects_copy[object]
|
||||
current_object_id += 1
|
||||
Global.convert_dictionary_values(scene_properties)
|
||||
deserialize_scene_properties()
|
||||
for object in object_properties:
|
||||
|
|
Loading…
Add table
Reference in a new issue