Don't double-present popup menu item text in cases where the item and shortcut resource name are identical.

This commit is contained in:
Nolan Darilek 2020-01-13 18:06:26 -06:00
parent fc5b591fe3
commit 22bb195db0

View File

@ -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: