1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-20 12:33:14 +00:00

Change the project's name before saving the pxo file

This commit is contained in:
Manolis Papadeas 2021-05-11 14:51:14 +03:00
parent 1b80100588
commit 0b9eb2bbed

View file

@ -271,6 +271,8 @@ func open_old_pxo_file(file : File, new_project : Project, first_line : String)
func save_pxo_file(path : String, autosave : bool, use_zstd_compression := true, project : Project = Global.current_project) -> void:
if !autosave:
project.name = path.get_file()
var serialized_data = project.serialize()
if !serialized_data:
Global.error_dialog.set_text(tr("File failed to save. Converting project data to dictionary failed."))
@ -299,7 +301,6 @@ func save_pxo_file(path : String, autosave : bool, use_zstd_compression := true,
return
if !autosave:
project.name = path.get_file()
current_save_paths[Global.current_project_index] = path
file.store_line(to_save)