Select the text in the filter LineEdit when pressing the shortcut

This commit is contained in:
Hugo Locurcio 2019-10-19 02:01:30 +02:00
parent 94213e7a1d
commit dd8eeb2835
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C

View File

@ -19,6 +19,7 @@ func _ready():
func _unhandled_input(event : InputEvent) -> void:
if event is InputEventKey and event.pressed and event.command and event.scancode == KEY_F:
filter_line_edit.grab_focus()
filter_line_edit.select_all()
func get_selected_item_name():
var tree_item : TreeItem = tree.get_selected()