From cf8ede147de5b7c7bfd8a0d67b4cbbaed3cd00db Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Tue, 3 Sep 2019 12:58:47 -0500 Subject: [PATCH] Only present tab focus if it has actually changed. --- addons/accessibility/accessible.gd | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/accessibility/accessible.gd b/addons/accessibility/accessible.gd index c729722..85d4b95 100644 --- a/addons/accessibility/accessible.gd +++ b/addons/accessibility/accessible.gd @@ -153,7 +153,6 @@ func focus_tab_container(): func input_tab_container(event): if event.echo or not event.pressed: return - tts.stop() var new_tab = node.current_tab if event.scancode == KEY_RIGHT: new_tab += 1 @@ -163,8 +162,10 @@ func input_tab_container(event): new_tab = node.get_tab_count() - 1 elif new_tab >= node.get_tab_count(): new_tab = 0 - node.current_tab = new_tab - focus_tab_container() + if node.current_tab != new_tab: + node.current_tab = new_tab + tts.stop() + focus_tab_container() func focus_tree(): if node.get_selected():