From f5cf3f3ca7bc8ccda0b934618f8b4264a684a2aa Mon Sep 17 00:00:00 2001 From: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Mon, 19 Oct 2020 00:04:06 +0300 Subject: [PATCH] Only grab guide focus when they're visible --- src/UI/Canvas/Rulers/Guide.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UI/Canvas/Rulers/Guide.gd b/src/UI/Canvas/Rulers/Guide.gd index a08c715..fbefaef 100644 --- a/src/UI/Canvas/Rulers/Guide.gd +++ b/src/UI/Canvas/Rulers/Guide.gd @@ -27,7 +27,7 @@ func _input(_event : InputEvent): else: point0.x -= width * 3 point1.x += width * 3 - if Global.can_draw and Global.has_focus and point_in_rectangle(mouse_pos, point0, point1) and Input.is_action_just_pressed("left_mouse"): + if Global.can_draw and Global.has_focus and point_in_rectangle(mouse_pos, point0, point1) and Input.is_action_just_pressed("left_mouse") and visible: if !point_in_rectangle(Global.canvas.current_pixel, Global.canvas.location, Global.canvas.location + project.size): has_focus = true Global.has_focus = false