diff --git a/CHANGELOG.md b/CHANGELOG.md index f682285c1..534392c71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ PinyaColada, RĂ©mi Verschelde (akien-mga), dasimonde, gschwind - Fixed issue where the user could grab and could not let go of the focus of guides even when they were invisible. - Fixed issues where fully transparent color could not be picked. One of these cases was [#364](https://github.com/Orama-Interactive/Pixelorama/issues/364). - Fixed "Export" option in the File menu not working properly and not remembering the directory path and file name when switching between projects (tabs). +- Fixed crash when loading a pxo older of 0.8.1 and selecting a frame other than the first. - Fixed Chinese and Korean characters not displaying properly in the Splash dialog and the About dialog. - Fixed crash when importing an incorrectly formatted GIMP Color Palette file. ([#363](https://github.com/Orama-Interactive/Pixelorama/issues/363)) - Using the lighten/darken on pixels with an alpha value of 0 no longer has an effect on them. diff --git a/src/Autoload/OpenSave.gd b/src/Autoload/OpenSave.gd index 0992d6ef1..474921f57 100644 --- a/src/Autoload/OpenSave.gd +++ b/src/Autoload/OpenSave.gd @@ -218,6 +218,8 @@ func open_old_pxo_file(file : File, new_project : Project, first_line : String) new_project.size = Vector2(width, height) new_project.frames.append(frame_class) + if frame >= new_project.frame_duration.size(): + new_project.frame_duration.append(1) frame_line = file.get_line() frame += 1 diff --git a/src/Classes/Project.gd b/src/Classes/Project.gd index cfc617bc8..cd4a779bd 100644 --- a/src/Classes/Project.gd +++ b/src/Classes/Project.gd @@ -339,6 +339,11 @@ func deserialize(dict : Dictionary) -> void: file_format = dict.export_file_format if dict.has("frame_duration"): frame_duration = dict.frame_duration + else: + for i in frames.size(): + if i < frame_duration.size(): + continue + frame_duration.append(1) func name_changed(value : String) -> void: name = value