mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00: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
|
@ -9,7 +9,7 @@ This update has been brought to you by the contributions of:
|
|||
PinyaColada, Rémi Verschelde (akien-mga)
|
||||
|
||||
### Added
|
||||
- Added a "frame properties" option on the popupmenu that appears when right-clicking on a cel. This lets the user choose a custom frame delay for that specific frame. ([#357](https://github.com/Orama-Interactive/Pixelorama/pull/357))
|
||||
- Added a "frame properties" option on the popup menu that appears when right-clicking on a cel. This lets the user choose a custom frame delay for that specific frame. ([#357](https://github.com/Orama-Interactive/Pixelorama/pull/357))
|
||||
- You can now select if you want rotation to apply in the selection, the current cel, the entire frame, all frames or even all projects (tabs)!
|
||||
|
||||
### Changed
|
||||
|
@ -19,6 +19,7 @@ PinyaColada, Rémi Verschelde (akien-mga)
|
|||
- Made .pxo saving safer. In case of a crash while parsing JSON data, the old .pxo file, if it exists, will no longer be overwritten and corrupted.
|
||||
- Fixed issue where the user could grab, and could not let go of, the focus of guides even when they were invisible.
|
||||
- Fixed issues where fully transparent color could not be picked. One of these cases was ([#364](https://github.com/Orama-Interactive/Pixelorama/issues/364)).
|
||||
- Fixed "Export" option in the File menu not working properly when switching between projects, and not remembering the directory path and file name, if the project is an imported image and the tabs were switched.
|
||||
- Fixed crash when importing an incorrectly formatted GIMP Color Palette file. ([#363](https://github.com/Orama-Interactive/Pixelorama/issues/363))
|
||||
<br><br>
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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…
Reference in a new issue