Skip to content

Commit

Permalink
Merge pull request #441 from shorepine/voices-select
Browse files Browse the repository at this point in the history
voices.py: fix error when menu changes to be shorter than stored sele…
  • Loading branch information
dpwe authored Jan 7, 2025
2 parents 133790d + 537f711 commit 9065a17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tulip/shared/py/voices.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def replace_items(self, items):
self.button_texts.append(i)

def select(self, index, defer=False):
if(self.selected is not None):
if self.selected is not None and self.selected < len(self.buttons):
self.buttons[self.selected].set_style_bg_color(tulip.pal_to_lv(self.default_bg), 0)
self.selected = index
if index is not None:
Expand Down

0 comments on commit 9065a17

Please sign in to comment.