- added a 'return' button when a fatal error is encountered allowing the user to continue the work

- fixed a crash in Milling Plugin when trying to mill slots that do not have drills in the same file
This commit is contained in:
Marius Stanciu
2022-11-19 02:29:40 +02:00
parent 22f4d92be7
commit c1377d5090
4 changed files with 33 additions and 12 deletions

View File

@@ -134,13 +134,19 @@ if __name__ == '__main__':
msgbox.setIcon(QtWidgets.QMessageBox.Icon.Critical)
bt_yes = msgbox.addButton("Quit", QtWidgets.QMessageBox.ButtonRole.YesRole)
bt_ret = msgbox.addButton("Return", QtWidgets.QMessageBox.ButtonRole.NoRole)
msgbox.setDefaultButton(bt_yes)
# msgbox.setTextFormat(Qt.TextFormat.RichText)
msgbox.exec()
response = msgbox.clickedButton()
if response == bt_ret:
pass
except Exception:
pass
QtWidgets.QApplication.quit()
QtWidgets.QApplication.quit()
else:
QtWidgets.QApplication.quit()
# or QtWidgets.QApplication.exit(0)
sys.excepthook = excepthook