mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 22:04:43 -04:00
Fixed issues with saving and backups
This commit is contained in:
parent
709a401373
commit
5fda35c2d8
4 changed files with 8 additions and 25 deletions
|
@ -462,24 +462,6 @@ func project_changed(value : int) -> void:
|
|||
current_project.change_project()
|
||||
|
||||
|
||||
func clear_frames() -> void:
|
||||
current_project.frames.clear()
|
||||
current_project.animation_tags.clear()
|
||||
current_project.animation_tags = current_project.animation_tags # To execute animation_tags_changed()
|
||||
|
||||
# Stop playing the animation
|
||||
play_backwards.pressed = false
|
||||
play_forward.pressed = false
|
||||
animation_timer.stop()
|
||||
|
||||
self.window_title = tr("untitled") + " - Pixelorama " + Global.current_version
|
||||
OpenSave.current_save_path = ""
|
||||
control.get_node("ExportDialog").was_exported = false
|
||||
control.file_menu.set_item_text(3, tr("Save..."))
|
||||
control.file_menu.set_item_text(6, tr("Export..."))
|
||||
current_project.undo_redo.clear_history(false)
|
||||
|
||||
|
||||
func dialog_open(open : bool) -> void:
|
||||
if open:
|
||||
can_draw = false
|
||||
|
|
|
@ -336,10 +336,13 @@ func reload_backup_file(project_paths : Array, backup_paths : Array) -> void:
|
|||
for i in range(project_paths.size()):
|
||||
# If project path is the same as backup save path -> the backup was untitled
|
||||
open_pxo_file(backup_paths[i], project_paths[i] == backup_paths[i])
|
||||
backup_save_paths[i] = backup_paths[i]
|
||||
# We need "i + 1" because the paths must be stored in
|
||||
# the new array slots, created from the Project class which was
|
||||
# created in the above open_pxo_file() method
|
||||
backup_save_paths[i + 1] = backup_paths[i]
|
||||
|
||||
if project_paths[i] != backup_paths[i]:
|
||||
current_save_paths[i] = project_paths[i]
|
||||
if project_paths[i] != backup_paths[i]: # If the user has saved
|
||||
current_save_paths[i + 1] = project_paths[i]
|
||||
Global.window_title = project_paths[i].get_file() + " - Pixelorama(*) " + Global.current_version
|
||||
Global.current_project.has_changed = true
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue