mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 21:14:42 -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
|
@ -33,6 +33,7 @@ var cameras_offset := [Vector2.ZERO, Vector2.ZERO, Vector2.ZERO] # Array of Vect
|
|||
var directory_path := ""
|
||||
var file_name := "untitled"
|
||||
var file_format : int = Export.FileFormat.PNG
|
||||
var was_exported := false
|
||||
|
||||
|
||||
func _init(_frames := [], _name := tr("untitled"), _size := Vector2(64, 64)) -> void:
|
||||
|
@ -197,8 +198,9 @@ func change_project() -> void:
|
|||
Export.directory_path = directory_path
|
||||
Export.file_name = file_name
|
||||
Export.file_format = file_format
|
||||
Export.was_exported = was_exported
|
||||
|
||||
if directory_path.empty():
|
||||
if !was_exported:
|
||||
Global.file_menu.get_popup().set_item_text(5, tr("Export"))
|
||||
else:
|
||||
Global.file_menu.get_popup().set_item_text(5, tr("Export") + " %s" % (file_name + Export.file_format_string(file_format)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue