Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
fix(ui): 🐛 update list when combobox selected
Browse files Browse the repository at this point in the history
  • Loading branch information
AnzhiZhang committed Jun 16, 2022
1 parent 3f408a6 commit cd19d56
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions utils/window/frames/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ def __init__(self, master: 'Main'):
self.modpack_version_label = Label(self, text='整合包版本:')
self.modpack_version_combobox = Combobox(self, state='readonly')

# Update list when combobox selected
self.sort_combobox.bind('<<ComboboxSelected>>', self.on_select)
self.game_version_combobox.bind('<<ComboboxSelected>>', self.on_select)

self.sort_label.pack(side='left')
self.sort_combobox.pack(side='left')
self.game_version_label.pack(side='left', padx=(10, 0))
Expand Down Expand Up @@ -51,3 +55,6 @@ def init(self):
def set_modpack_version(self, values: List[str]):
self.modpack_version_combobox['values'] = values
self.modpack_version_combobox.current(0)

def on_select(self, event=None):
self.main_window.show_frame.update_list()

0 comments on commit cd19d56

Please sign in to comment.