修复了无法正常关闭程序的Bug
This commit is contained in:
parent
6675a46cb6
commit
ffc16830b5
@ -1,4 +1,5 @@
|
||||
import os
|
||||
import sys
|
||||
import webbrowser
|
||||
import threading
|
||||
import tkinter as tk
|
||||
@ -465,8 +466,7 @@ class App(tk.Tk):
|
||||
def on_close(self): # 关闭程序
|
||||
if self.scanner.is_alive():
|
||||
self.scanner.join()
|
||||
root.destroy()
|
||||
exit()
|
||||
sys.exit(0)
|
||||
|
||||
def set_window_size(self): # 设置窗口大小
|
||||
screen_width = self.winfo_screenwidth()
|
||||
@ -599,13 +599,11 @@ if __name__ == "__main__":
|
||||
update_manager = UpdateManager(root, is_startup=True)
|
||||
proceed = update_manager.check_latest_release()
|
||||
if not proceed:
|
||||
root.destroy()
|
||||
exit()
|
||||
sys.exit(0)
|
||||
start_path = filedialog.askdirectory()
|
||||
if start_path:
|
||||
app = App(start_path)
|
||||
app.mainloop()
|
||||
else:
|
||||
messagebox.showinfo("提示", "没有选中任何目录,程序即将退出")
|
||||
root.destroy()
|
||||
exit()
|
||||
sys.exit(0)
|
||||
|
Loading…
Reference in New Issue
Block a user