Allow ignoring errors that happen the gui

This commit is contained in:
Timmy Welch 2024-03-10 13:59:58 -07:00
parent c99f3fa083
commit 51db3e1249

View File

@ -24,9 +24,12 @@ try:
"""
if QtWidgets.QApplication.instance() is not None:
errorbox = QtWidgets.QMessageBox()
errorbox.setStandardButtons(QtWidgets.QMessageBox.StandardButton.Abort|QtWidgets.QMessageBox.StandardButton.Ignore)
errorbox.setText(log_msg)
errorbox.exec()
QtWidgets.QApplication.exit(1)
if errorbox.exec() == QtWidgets.QMessageBox.StandardButton.Abort:
QtWidgets.QApplication.exit(1)
else:
logger.warning("Exception ignored")
else:
logger.debug("No QApplication instance available.")