mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Fixed issue with line_2d in Canvas.gd where it wasn't being freed when releasing shift
This commit is contained in:
parent
a04e179611
commit
46e4ea15ad
|
@ -259,6 +259,8 @@ func _input(event : InputEvent) -> void:
|
|||
Global.update_right_custom_brush()
|
||||
|
||||
if Global.can_draw && Global.has_focus && Input.is_action_just_pressed("shift") && (["Pencil", "Eraser", "LightenDarken"].has(Global.current_left_tool) || ["Pencil", "Eraser", "LightenDarken"].has(Global.current_right_tool)):
|
||||
if is_instance_valid(line_2d):
|
||||
line_2d.queue_free()
|
||||
line_2d = Line2D.new()
|
||||
line_2d.width = 0.5
|
||||
line_2d.default_color = Color.darkgray
|
||||
|
|
Loading…
Reference in a new issue