Skip to content

Commit 9cbf967

Browse files
authored
Fixed quick bar shortcuts conflicting with text input in graph (contributed by williamchange)
Fixed quick bar shortcuts conflicting with text input in graph
2 parents 25d3da2 + 6287ee6 commit 9cbf967

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

material_maker/panels/graph_edit/graph_edit.gd

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,11 @@ func _input(event : InputEvent) -> void:
182182

183183
# Grab graph focus for quick bar shortcuts to work properly
184184
# (i.e. returning to graph after interacting with other panels)
185-
if Rect2(Vector2.ZERO, size).has_point(get_local_mouse_position()):
186-
if event is InputEventKey and event.unicode >= KEY_0 and event.unicode <= KEY_9 and event.pressed:
185+
if Rect2(Vector2.ZERO, size).has_point(get_local_mouse_position()) and event is InputEventKey:
186+
var focus_owner : Control = get_viewport().gui_get_focus_owner()
187+
if focus_owner is LineEdit or focus_owner is TextEdit:
188+
return
189+
if event.unicode >= KEY_0 and event.unicode <= KEY_9 and event.pressed:
187190
grab_focus()
188191

189192
func _gui_input(event) -> void:

0 commit comments

Comments
 (0)