Menu items on the bug report form are hidden if they don't have any options to select.
This commit is contained in:
parent
e38a4e190e
commit
64d3f0a51e
@ -54,17 +54,19 @@ func fill_tags(tag_list:Array):
|
||||
return
|
||||
|
||||
__product_name.text = __server_api._get_project_name()
|
||||
__fill_item_list(__version_button, BugbotServerAPI.BugbotTagArray.VERSION)
|
||||
__fill_item_list(__hardware_button, BugbotServerAPI.BugbotTagArray.HARDWARE)
|
||||
__fill_item_list(__os_button, BugbotServerAPI.BugbotTagArray.OS)
|
||||
__fill_item_list(__component_button, BugbotServerAPI.BugbotTagArray.COMPONENT)
|
||||
__fill_item_list(__severity_button, BugbotServerAPI.BugbotTagArray.SEVERITY)
|
||||
__fill_item_list(__version_button, __version_label, BugbotServerAPI.BugbotTagArray.VERSION)
|
||||
__fill_item_list(__hardware_button, __hardware_label, BugbotServerAPI.BugbotTagArray.HARDWARE)
|
||||
__fill_item_list(__os_button, __os_label, BugbotServerAPI.BugbotTagArray.OS)
|
||||
__fill_item_list(__component_button, __component_label, BugbotServerAPI.BugbotTagArray.COMPONENT)
|
||||
__fill_item_list(__severity_button, __severity_label, BugbotServerAPI.BugbotTagArray.SEVERITY)
|
||||
|
||||
func __fill_item_list(menu_button:MenuButton, label_group:int):
|
||||
func __fill_item_list(menu_button:MenuButton, menu_label:Label, label_group:int):
|
||||
var menu_options : Array = __label_groups[label_group]
|
||||
if menu_options.is_empty():
|
||||
menu_button.text = __BUTTON_DISABLED_MESSAGE
|
||||
menu_button.disabled = true
|
||||
menu_button.visible = false
|
||||
menu_label.visible = false
|
||||
else:
|
||||
var menu : PopupMenu = menu_button.get_popup()
|
||||
for i in menu_options.size():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user