merged "Use submenus for listing options in dropdown menu." #3905 thanks @alexrj Adapted the "Use submenus" code to sort the menus in the same order as they appear in the parameter tabs.