1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

Fixed gradient dialog crash

Occurred sometimes when trying to generate a gradient in a different project that has a different size.
This commit is contained in:
OverloadedOrama 2020-07-18 17:29:05 +03:00
parent 29e9579eb6
commit 7aee58ec1a

View file

@ -11,14 +11,10 @@ onready var color2 : ColorPickerButton = $VBoxContainer/ColorsContainer/ColorPic
onready var steps : SpinBox = $VBoxContainer/StepsContainer/StepSpinBox onready var steps : SpinBox = $VBoxContainer/StepsContainer/StepSpinBox
func _ready() -> void: func _on_GradientDialog_about_to_show() -> void:
current_cel = Image.new()
preview_image = Image.new() preview_image = Image.new()
preview_texture = ImageTexture.new() preview_texture = ImageTexture.new()
preview_texture.flags = 0 preview_texture.flags = 0
func _on_GradientDialog_about_to_show() -> void:
current_cel = Global.current_project.frames[Global.current_project.current_frame].cels[Global.current_project.current_layer].image current_cel = Global.current_project.frames[Global.current_project.current_frame].cels[Global.current_project.current_layer].image
update_preview() update_preview()