From 3a160df5fd26dd94c94d0dce82d381d258571d3b Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Fri, 5 Jun 2020 15:14:04 -0500 Subject: [PATCH] Remove code that no longer seems necessary for restoring focus in the editor when lost. --- Accessible.gd | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/Accessible.gd b/Accessible.gd index 2d6efe4..902b570 100644 --- a/Accessible.gd +++ b/Accessible.gd @@ -572,20 +572,15 @@ func focused(): spoke_hint_tooltip = false -var timer - - func unfocused(): print_debug("Unfocused") position_in_children = 0 - timer = node.get_tree().create_timer(1) func click_focused(): if node.has_focus(): return if node.focus_mode == Control.FOCUS_ALL: - print_debug("Grabbing focus: %s" % node) node.grab_focus() @@ -733,17 +728,3 @@ func _init(node): else: node.connect("item_selected", self, "tree_item_selected") node.connect("tree_exiting", self, "queue_free", [], Object.CONNECT_DEFERRED) - - -func _process(delta): - if timer and timer.time_left <= 0: - if node.is_inside_tree() and not node.get_focus_owner(): - node.get_tree().root.warp_mouse(node.rect_global_position) - timer = null - - -func free(): - if timer: - timer.unreference() - timer = null - .free()