From 3bc8de04b41253f2cd57f3df9b6b67b8296c5d00 Mon Sep 17 00:00:00 2001 From: Mr-ShiRui Date: Thu, 17 Oct 2024 17:45:36 +0800 Subject: [PATCH] Fix exit behavior with sys.exit() --- .gitignore | 1 + .../qrc/__pycache__/res_rc.cpython-311.pyc | Bin 1111235 -> 1111254 bytes src/__pycache__/mainwindow.cpython-311.pyc | Bin 86609 -> 86681 bytes src/mainwindow.py | 5 +++-- 4 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5eedd52 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +make.ps1 \ No newline at end of file diff --git a/resources/qrc/__pycache__/res_rc.cpython-311.pyc b/resources/qrc/__pycache__/res_rc.cpython-311.pyc index e09bcd6ff073907de938d40bfc856b3241986504..598cdad617f9f8199652d254b54fdff02f69b8fc 100644 GIT binary patch delta 103 zcmX^7()rp;XYS>^yj%=GAbm-ok-L?fv6Y*tm7BSho28YTwUwK#m7Belo1>MRvz42x zl^dvlrOQ k#KMR~q#_f!C`2hLQHwA%!irXOC;jZrH}0$N2j>Fj2i7#P_I7^fxbf(v>2}dJy{7N9)R_b>9L;i@{JxzAS z&xZoJFaDA;nx#A4Zcji_RgW(aaJ#pIn1a13Ak+$`H4&SFpjwVisEaS)Pnkb5EB4a_ zC#;-=-!6+Nqi!N7oCtb+ha!}qiUXB>ePSlHn7Rd9d3kx=#sP5 z>pZzC)#b<-z0q>3eIx#ef>?fHwizbL8IF7>5mrq^3F*jd9h0C*ZgJ${+4eY=cBNzRPabJi1U4RX1&2o}p9I}4D=L(b-G=D3c=>JjwB z>y$uLiTJ}Iu|V3BOQBLuOP)B2q@{iC|N8Sr|HggY+m&?~PtMkZ+*w}rj zFP4$PY@cb%+^kGkE32|1=%qWdeqjc`tj(!H%UPdO1Y_lcImK{8?Dd>lK$A%I#-Fhb{0%YTZO|K{I5L5Jd668kN@%&z8&bR~xePaI`p>|6=l} zf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Bt~*q2;L~BCj;)9v!9kYs{?e47GeN>+^3)@(xH+3)l*nNiy}9 zQKbWVK=h2JVIQjp-VR6gOB*SCEa|l6_XBnT zxYYJAT8|_obSKCs(d-300eB4XEZ}*-ZorFxJ%E=0F9ZGtconc8@H*fi;1J*~z(1jT z4*DGBIaILe!fGWOd--7uJPKF@;w-eP32;9d_?__v5CNO@hV#W?$B5$zBGH82@@CO# zIoCZfqPa9fo=qP{QdD}&TU(aOap=khj0Y40CIE5)C4f@>aI46_cp}>PIg@`=GtH|F zpS*q{TD(pXwZ2K7Ll^q4pntAxA-N%J6wY$oDug&bZIsAAo-ha%y-OEUy0>BW{{s^a BS55!` diff --git a/src/mainwindow.py b/src/mainwindow.py index e19ed27..3fe26bf 100644 --- a/src/mainwindow.py +++ b/src/mainwindow.py @@ -24,7 +24,7 @@ def load_large_modules(): - global pd, pickle, configparser, logging + global pd, pickle, configparser, logging, sys global QFileDialog, QMessageBox, QDesktopServices, QPainter, QColor global QUrl, QSettings, QPropertyAnimation, Qt global MUSE_API, CheckTifDimensions @@ -32,6 +32,7 @@ def load_large_modules(): global Ui_MainWindow global Path + import sys import pandas as pd import pickle import configparser @@ -460,7 +461,7 @@ def on_action_00_save_triggered(self): QMessageBox.critical(self, "Error", f"Failed to save file: {e}") def on_action_00_exit_triggered(self): - exit() + sys.exit() def on_action_00_ga_triggered(self): self.mgot_widget.show()