mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-22 05:23:14 +00:00
Change the project's name before saving the pxo file
This commit is contained in:
parent
1b80100588
commit
0b9eb2bbed
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
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()
|
var serialized_data = project.serialize()
|
||||||
if !serialized_data:
|
if !serialized_data:
|
||||||
Global.error_dialog.set_text(tr("File failed to save. Converting project data to dictionary failed."))
|
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
|
return
|
||||||
|
|
||||||
if !autosave:
|
if !autosave:
|
||||||
project.name = path.get_file()
|
|
||||||
current_save_paths[Global.current_project_index] = path
|
current_save_paths[Global.current_project_index] = path
|
||||||
|
|
||||||
file.store_line(to_save)
|
file.store_line(to_save)
|
||||||
|
|
Loading…
Add table
Reference in a new issue