Skip to content

Commit

Permalink
feat: 配置工具关闭进程调整为弹窗并最小化,提示用户自行关闭,避免代码里关闭时打包版本会报某些模块无法定位的错误(暂时不知道为啥)
Browse files Browse the repository at this point in the history
  • Loading branch information
fzls committed Aug 14, 2024
1 parent 99ae02a commit a7ed191
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion config_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,11 @@ def restart(self):
else:
os.startfile(sys.argv[0])

kill_process(os.getpid())
# 目前打包版本这里代码里关闭进程,会报 XX模块 无法找到的错误,如 unicodedata jaraco.text pyexpat,这里让用户自己关闭
# kill_process(os.getpid())
self.setWindowTitle("!!!这是之前打开的实例,记得点击右上角的X关掉我!!!")
show_message("提示", "新的配置工具实例将启动,点击确认后之前打开的实例将最小化,请手动将关闭掉~")
self.showMinimized()

def save(self, checked=False, show_message_box=True):
cfg = self.to_config()
Expand Down

0 comments on commit a7ed191

Please sign in to comment.