加入临时取消+和-标记的功能

This commit is contained in:
13632530821
2022-11-19 18:47:27 +08:00
parent d8e006a2de
commit 8edd27191a
2 changed files with 8 additions and 2 deletions

4
.gitignore vendored
View File

@@ -1,4 +1,6 @@
点名器.spec
build/
dist/
.history/
.history/
config.data
names.xls

View File

@@ -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)