Skip to content

Commit

Permalink
Fix exit behavior with sys.exit()
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-ShiRui committed Oct 17, 2024
1 parent b2c906b commit 3bc8de0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
make.ps1
Binary file modified resources/qrc/__pycache__/res_rc.cpython-311.pyc
Binary file not shown.
Binary file modified src/__pycache__/mainwindow.cpython-311.pyc
Binary file not shown.
5 changes: 3 additions & 2 deletions src/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@


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
global UDSA_Dialog, PSSA_Dialog
global Ui_MainWindow
global Path

import sys
import pandas as pd
import pickle
import configparser
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 3bc8de0

Please sign in to comment.