1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Set Global.saved = true when creating a new image

This commit is contained in:
OverloadedOrama 2020-04-02 15:28:47 +03:00
parent fdf00171af
commit 30e8522677
2 changed files with 6 additions and 2 deletions

View file

@ -22,6 +22,7 @@ func _on_CreateNewImage_confirmed() -> void:
Global.canvases = Global.canvases # To trigger Global.canvases_changed()
Global.current_frame = 0
Global.layers = Global.layers # To trigger Global.layers_changed()
Global.saved = true
if fill_color.a > 0:
Global.canvas.layers[0][0].fill(fill_color)
Global.canvas.layers[0][0].lock()

View file

@ -395,6 +395,11 @@ func help_menu_id_pressed(id : int) -> void:
$AboutDialog.popup_centered()
Global.can_draw = false
func _on_UnsavedCanvasDialog_confirmed() -> void:
$CreateNewImage.popup_centered()
func _on_OpenSprite_file_selected(path : String) -> void:
var file := File.new()
var err := file.open(path, File.READ)
@ -828,5 +833,3 @@ func _on_QuitDialog_confirmed() -> void:
get_tree().quit()
func _on_UnsavedCanvasDialog_confirmed() -> void :
$CreateNewImage.popup_centered()