Remove automatic allocation of numbers to option; it clashed with _default states looking for numbers. An automatic number-key will now only be allocated if no option key is given. Resolves #1121.

This commit is contained in:
Griatch 2016-11-20 22:15:35 +01:00
parent 9db98bcc9a
commit 4a71a70af4

View file

@ -775,10 +775,9 @@ class EvMenu(object):
goto, execute = dic.get("goto", None), dic.get("exec", None)
self.default = (goto, execute)
else:
keys = list(make_iter(dic.get("key", str(inum+1).strip()))) + [str(inum+1)]
keys = list(make_iter(dic.get("key", str(inum+1).strip())))
desc = dic.get("desc", dic.get("text", _ERR_NO_OPTION_DESC).strip())
goto, execute = dic.get("goto", None), dic.get("exec", None)
if keys:
display_options.append((keys[0], desc))
for key in keys: