From a9692ca8592d2d838da8257cd514354372b843af Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Mon, 23 Jan 2023 19:05:36 +0200 Subject: [PATCH] Fix bug where the tool changes while having an image brush selected The indicator appeared as a white square until the mouse moved, and errors appeared in the debugger. --- src/UI/Canvas/Indicators.gd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/UI/Canvas/Indicators.gd b/src/UI/Canvas/Indicators.gd index 1f8ff0b86..0e83841a2 100644 --- a/src/UI/Canvas/Indicators.gd +++ b/src/UI/Canvas/Indicators.gd @@ -2,8 +2,9 @@ extends Node2D func _input(event: InputEvent) -> void: - if Global.has_focus and event is InputEventMouseMotion: - update() + if Global.has_focus: + if event is InputEventMouse or event is InputEventKey: + update() func _draw() -> void: