mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Set Global.saved = true when creating a new image
This commit is contained in:
parent
fdf00171af
commit
30e8522677
|
@ -22,6 +22,7 @@ func _on_CreateNewImage_confirmed() -> void:
|
||||||
Global.canvases = Global.canvases # To trigger Global.canvases_changed()
|
Global.canvases = Global.canvases # To trigger Global.canvases_changed()
|
||||||
Global.current_frame = 0
|
Global.current_frame = 0
|
||||||
Global.layers = Global.layers # To trigger Global.layers_changed()
|
Global.layers = Global.layers # To trigger Global.layers_changed()
|
||||||
|
Global.saved = true
|
||||||
if fill_color.a > 0:
|
if fill_color.a > 0:
|
||||||
Global.canvas.layers[0][0].fill(fill_color)
|
Global.canvas.layers[0][0].fill(fill_color)
|
||||||
Global.canvas.layers[0][0].lock()
|
Global.canvas.layers[0][0].lock()
|
||||||
|
|
|
@ -395,6 +395,11 @@ func help_menu_id_pressed(id : int) -> void:
|
||||||
$AboutDialog.popup_centered()
|
$AboutDialog.popup_centered()
|
||||||
Global.can_draw = false
|
Global.can_draw = false
|
||||||
|
|
||||||
|
|
||||||
|
func _on_UnsavedCanvasDialog_confirmed() -> void:
|
||||||
|
$CreateNewImage.popup_centered()
|
||||||
|
|
||||||
|
|
||||||
func _on_OpenSprite_file_selected(path : String) -> void:
|
func _on_OpenSprite_file_selected(path : String) -> void:
|
||||||
var file := File.new()
|
var file := File.new()
|
||||||
var err := file.open(path, File.READ)
|
var err := file.open(path, File.READ)
|
||||||
|
@ -828,5 +833,3 @@ func _on_QuitDialog_confirmed() -> void:
|
||||||
|
|
||||||
get_tree().quit()
|
get_tree().quit()
|
||||||
|
|
||||||
func _on_UnsavedCanvasDialog_confirmed() -> void :
|
|
||||||
$CreateNewImage.popup_centered()
|
|
Loading…
Reference in a new issue