Skip to content

Commit

Permalink
Call handle_selected after items are changed, if previous is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
lpenz committed Nov 26, 2023
1 parent bca7391 commit 446e5c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ptvertmenu/vertmenuuicontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ def items(self, items: Iterable[Item]) -> None:
try:
self.selected_item = previous
except IndexError:
pass
# Not possible, let's just handle the current item:
self.handle_selected()

@property
def selected(self) -> int:
Expand Down

0 comments on commit 446e5c9

Please sign in to comment.