From ed1b4bf1cdff8c9de954bd8a1500830279c08fe9 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 25 Feb 2023 12:17:04 +0000 Subject: [PATCH] TUI: Ignore the default value if it does not exist Signed-off-by: Michael Tremer --- src/python/tui.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/python/tui.py b/src/python/tui.py index 3bb91aa..1b635a8 100644 --- a/src/python/tui.py +++ b/src/python/tui.py @@ -309,6 +309,10 @@ class SelectWindow(ButtonsWindow): super().__init__(tui, title, text, buttons=buttons, height=height, width=width, help=help) + # Reset default it is not part of the items + if not default in items: + default = None + self.items = items self.default = default self.multi = multi -- 2.47.2