From 7aee58ec1af53c92f3282522875d995bf9acd69a Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Sat, 18 Jul 2020 17:29:05 +0300 Subject: [PATCH] Fixed gradient dialog crash Occurred sometimes when trying to generate a gradient in a different project that has a different size. --- src/UI/Dialogs/GradientDialog.gd | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/UI/Dialogs/GradientDialog.gd b/src/UI/Dialogs/GradientDialog.gd index 1e2b35722..76ab4c966 100644 --- a/src/UI/Dialogs/GradientDialog.gd +++ b/src/UI/Dialogs/GradientDialog.gd @@ -11,14 +11,10 @@ onready var color2 : ColorPickerButton = $VBoxContainer/ColorsContainer/ColorPic onready var steps : SpinBox = $VBoxContainer/StepsContainer/StepSpinBox -func _ready() -> void: - current_cel = Image.new() +func _on_GradientDialog_about_to_show() -> void: preview_image = Image.new() preview_texture = ImageTexture.new() 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 update_preview()