mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Fixed crash when loading a .pxo file with less layers than the current project already had
This commit is contained in:
parent
cf1530d338
commit
d82aa339f8
|
@ -51,6 +51,7 @@ func open_pxo_file(path : String, untitled_backup : bool = false) -> void:
|
||||||
|
|
||||||
var frame := 0
|
var frame := 0
|
||||||
Global.layers.clear()
|
Global.layers.clear()
|
||||||
|
|
||||||
var linked_cels := []
|
var linked_cels := []
|
||||||
if file_major_version >= 0 and file_minor_version > 6:
|
if file_major_version >= 0 and file_minor_version > 6:
|
||||||
var global_layer_line := file.get_line()
|
var global_layer_line := file.get_line()
|
||||||
|
@ -123,6 +124,7 @@ func open_pxo_file(path : String, untitled_backup : bool = false) -> void:
|
||||||
frame += 1
|
frame += 1
|
||||||
|
|
||||||
Global.canvases = Global.canvases # Just to call Global.canvases_changed
|
Global.canvases = Global.canvases # Just to call Global.canvases_changed
|
||||||
|
Global.current_layer = Global.layers.size() - 1
|
||||||
Global.current_frame = frame - 1
|
Global.current_frame = frame - 1
|
||||||
Global.layers = Global.layers # Just to call Global.layers_changed
|
Global.layers = Global.layers # Just to call Global.layers_changed
|
||||||
# Load tool options
|
# Load tool options
|
||||||
|
|
Loading…
Reference in a new issue