mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 16:14:43 -04:00
Fixed "Export" option in the File menu not working properly when switching between projects
Export.was_reported was keeping its value when switching projects, instead of being project-specific. Also fixed issue where imported images were not remembering the directory_path and file_name when switching projects.
This commit is contained in:
parent
e6da4d2b30
commit
4e33476a4d
4 changed files with 9 additions and 2 deletions
|
@ -193,6 +193,7 @@ func export_processed_images(ignore_overwrites: bool, export_dialog: AcceptDialo
|
|||
|
||||
# Store settings for quick export and when the dialog is opened again
|
||||
was_exported = true
|
||||
Global.current_project.was_exported = true
|
||||
Global.file_menu.get_popup().set_item_text(5, tr("Export") + " %s" % (file_name + file_format_string(file_format)))
|
||||
|
||||
# Only show when not exporting gif - gif export finishes in thread
|
||||
|
|
|
@ -326,6 +326,7 @@ func save_pxo_file(path : String, autosave : bool, use_zstd_compression := true,
|
|||
Export.file_name = path.get_file().trim_suffix(".pxo")
|
||||
Export.directory_path = path.get_base_dir()
|
||||
Export.was_exported = false
|
||||
project.was_exported = false
|
||||
Global.file_menu.get_popup().set_item_text(3, tr("Save") + " %s" % path.get_file())
|
||||
|
||||
|
||||
|
@ -454,6 +455,8 @@ func set_new_tab(project : Project, path : String) -> void:
|
|||
Global.window_title = Global.window_title + "(*)"
|
||||
var file_name := path.get_basename().get_file()
|
||||
var directory_path := path.get_basename().replace(file_name, "")
|
||||
project.directory_path = directory_path
|
||||
project.file_name = file_name
|
||||
Export.directory_path = directory_path
|
||||
Export.file_name = file_name
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue