correct solution to crash

This commit is contained in:
Lincoln Stein
2023-08-24 21:01:47 -04:00
committed by Kent Keirsey
parent 8114fc7bc2
commit 0bf5fee1b2
2 changed files with 8 additions and 15 deletions

View File

@ -264,6 +264,8 @@ class SingleSelectWithChanged(npyscreen.SelectOne):
class SingleSelectColumnsSimple(SelectColumnBase, SingleSelectWithChanged):
"""Row of radio buttons. Spacebar to select."""
def __init__(self, screen, columns: int = 1, values: list = [], **keywords):
self.columns = columns
self.value_cnt = len(values)
@ -271,9 +273,6 @@ class SingleSelectColumnsSimple(SelectColumnBase, SingleSelectWithChanged):
self.on_changed = None
super().__init__(screen, values=values, **keywords)
def when_value_edited(self):
self.h_select(self.cursor_line)
def h_cursor_line_right(self, ch):
self.h_exit_down("bye bye")
@ -282,6 +281,8 @@ class SingleSelectColumnsSimple(SelectColumnBase, SingleSelectWithChanged):
class SingleSelectColumns(SingleSelectColumnsSimple):
"""Row of radio buttons. When tabbing over a selection, it is auto selected."""
def when_cursor_moved(self):
self.h_select(self.cursor_line)