mirror of
https://github.com/HChaZZY/Random-Picker.git
synced 2025-12-06 10:33:50 +08:00
加入临时取消+和-标记的功能
This commit is contained in:
6
点名器.pyw
6
点名器.pyw
@@ -119,7 +119,7 @@ for tmp_class in classes:
|
||||
listbox.insert("end",tmp_class)
|
||||
|
||||
def sel_class(flag = 1):
|
||||
global filter, listbox, classes, cur_stu, students
|
||||
global filter, listbox, classes, cur_stu, students, percent_override
|
||||
filter.clear()
|
||||
for selection in listbox.curselection():
|
||||
# print(selection)
|
||||
@@ -128,6 +128,7 @@ def sel_class(flag = 1):
|
||||
if filter:
|
||||
if flag:
|
||||
msgbox.showinfo('班级选择已应用', '已应用当前班级选择', parent=gui)
|
||||
percent_override = False
|
||||
cur_stu.clear()
|
||||
for student in students:
|
||||
if student.class_name in filter:
|
||||
@@ -136,9 +137,12 @@ def sel_class(flag = 1):
|
||||
else:
|
||||
if flag:
|
||||
msgbox.showwarning('班级选择已应用', '当前设置会选择所有班级的名单,这样对吗?', parent=gui)
|
||||
percent_override = False
|
||||
filter = classes[:]
|
||||
cur_stu = students[:]
|
||||
|
||||
|
||||
|
||||
def choose():
|
||||
global last_choice, cur_stu
|
||||
sel_class(0)
|
||||
|
||||
Reference in New Issue
Block a user