1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00
This commit is contained in:
OverloadedOrama 2020-01-10 16:21:46 +02:00
parent 65f9aa353c
commit d72bda71ad
4 changed files with 9 additions and 4 deletions

View file

@ -10,12 +10,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- In addition to the middle mouse button, you can now use `Space` to pan around the canvas.
### Changed
- When saving a .pxo file, the file path (along with the file name) gets remembered by the Export PNG file dialog path. (Issue #114)
- More translatable strings, updates to Greek & Brazilian Portuguese (thanks to YeldhamDev) localizations.
- The dark theme button is now pressed by default if the user hasn't saved a theme preference in the config file.
- Added a VSplitContainer for Palettes and Layers.
- Added a ScrollContainer for the palette buttons on the Edit Palette popup.
- Made Palette .json files more readable, and made "comments" on top of the color data.
- The grid options are now being updated realtime when they're being changed from the preferences.
- The grid options are now being updated realtime when they're being changed from the preferences, and they are also being saved in the config cache file.
### Fixed
- Fixed crash that occured when trying to delete contents of a selection, that were outside the canvas.

View file

@ -32,7 +32,6 @@ func _ready() -> void:
# Set default values for Grid & Guide options
if Global.config_cache.has_section_key("preferences", "grid_size"):
var grid_size = Global.config_cache.get_value("preferences", "grid_size")
print(Global.grid_width)
Global.grid_width = int(grid_size.x)
Global.grid_height = int(grid_size.y)
grid_width_value.value = grid_size.x

View file

@ -455,8 +455,12 @@ func _on_OpenSprite_file_selected(path : String) -> void:
OS.set_window_title(path.get_file() + " - Pixelorama")
func _on_SaveSprite_file_selected(path) -> void:
func _on_SaveSprite_file_selected(path : String) -> void:
current_save_path = path
$ExportSprites.current_export_path = path.trim_suffix(".pxo") + ".png"
$ExportSprites.current_path = $ExportSprites.current_export_path
file_menu.set_item_text(2, tr("Save") + " %s" % path.get_file())
file_menu.set_item_text(5, tr("Export") + " %s" % $ExportSprites.current_path.get_file())
var file := File.new()
var err := file.open(path, File.WRITE)
if err == 0:
@ -521,6 +525,7 @@ func clear_canvases() -> void:
Global.canvases.clear()
current_save_path = ""
$ExportSprites.current_export_path = ""
file_menu.set_item_text(2, "Save")
file_menu.set_item_text(5, "Export PNG...")
OS.set_window_title("(" + tr("untitled") + ") - Pixelorama")
Global.undo_redo.clear_history(false)