mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 21:04:43 -04:00
Made pxo saving a bit safer
It now first attempts to serialize the project data and turn them to JSON, and then opens the file. This is a lto safer because, if a crash happens in the serialization, the file is not already open, and therefore it does not get corrupt. Earlier, if a crash happened, the file would be empty. This meant that if that file existed previously, all of the data would be lost.
This commit is contained in:
parent
852365c38f
commit
e94bcf50e0
5 changed files with 58 additions and 50 deletions
|
@ -8,7 +8,7 @@ var undo_redo : UndoRedo
|
|||
var undos := 0 # The number of times we added undo properties
|
||||
var has_changed := false setget has_changed_changed
|
||||
var frames := [] setget frames_changed # Array of Frames (that contain Cels)
|
||||
var frame_duration := []
|
||||
var frame_duration := []
|
||||
var layers := [] setget layers_changed # Array of Layers
|
||||
var current_frame := 0 setget frame_changed
|
||||
var current_layer := 0 setget layer_changed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue