Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions material_maker/panels/graph_edit/graph_edit.gd
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,11 @@ func _input(event : InputEvent) -> void:

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

func _gui_input(event) -> void:
Expand Down