From 8edd27191a84a4d010bf4b4d2b527fefd0bff2af Mon Sep 17 00:00:00 2001 From: 13632530821 Date: Sat, 19 Nov 2022 18:47:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E4=B8=B4=E6=97=B6=E5=8F=96?= =?UTF-8?q?=E6=B6=88+=E5=92=8C-=E6=A0=87=E8=AE=B0=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +++- 点名器.pyw | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 2e5ace4..8fe3e88 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ 点名器.spec build/ dist/ -.history/ \ No newline at end of file +.history/ +config.data +names.xls \ No newline at end of file diff --git a/点名器.pyw b/点名器.pyw index 51895b2..a1a4ff8 100644 --- a/点名器.pyw +++ b/点名器.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)