From 22bb195db0714609fe89f7ab2f8367910b28b113 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Mon, 13 Jan 2020 18:06:26 -0600 Subject: [PATCH] Don't double-present popup menu item text in cases where the item and shortcut resource name are identical. --- Accessible.gd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Accessible.gd b/Accessible.gd index cb4e90b..6bdf23e 100644 --- a/Accessible.gd +++ b/Accessible.gd @@ -225,15 +225,16 @@ func popup_menu_item_id_focused(index): print_debug("item id focus %s" % index) var tokens = PoolStringArray([]) var shortcut = node.get_item_shortcut(index) + var name if shortcut: - var name = shortcut.resource_name + name = shortcut.resource_name if name: tokens.append(name) var text = shortcut.get_as_text() if text != "None": tokens.append(text) var item = node.get_item_text(index) - if item: + if item and item != name: tokens.append(item) var submenu = node.get_item_submenu(index) if submenu: