diff --git a/cura/CrashHandler.py b/cura/CrashHandler.py index e90619aee5..a6b2373031 100644 --- a/cura/CrashHandler.py +++ b/cura/CrashHandler.py @@ -72,8 +72,10 @@ class CrashHandler: if has_started and exception_type not in fatal_exception_types: return - self._send_report_checkbox = None - self.early_crash_dialog = self._createEarlyCrashDialog() + if not has_started: + self._send_report_checkbox = None + self.early_crash_dialog = self._createEarlyCrashDialog() + self.dialog = QDialog() self._createDialog() @@ -99,7 +101,7 @@ class CrashHandler: self._send_report_checkbox.setChecked(True) show_details_button = QPushButton(catalog.i18nc("@action:button", "Show detailed crash report"), dialog) - show_details_button.setMaximumWidth(180) + show_details_button.setMaximumWidth(200) show_details_button.clicked.connect(self._showDetailedReport) layout.addWidget(self._send_report_checkbox) diff --git a/cura_app.py b/cura_app.py index d0170e5972..6c2d1c2937 100755 --- a/cura_app.py +++ b/cura_app.py @@ -99,18 +99,21 @@ def exceptHook(hook_type, value, traceback): from PyQt5.Qt import QApplication if CuraApplication.Created: _crash_handler = CrashHandler(hook_type, value, traceback, has_started) + if CuraApplication.splash is not None: + CuraApplication.splash.close() if not has_started: CuraApplication.getInstance().removePostedEvents(None) _crash_handler.early_crash_dialog.show() sys.exit(CuraApplication.getInstance().exec_()) else: _crash_handler.show() - sys.exit(1) else: application = QApplication(sys.argv) application.removePostedEvents(None) _crash_handler = CrashHandler(hook_type, value, traceback, has_started) - CuraApplication.getInstance().closeSplash() + # This means the QtApplication could be created and so the splash screen. Then Cura closes it + if CuraApplication.splash is not None: + CuraApplication.splash.close() _crash_handler.early_crash_dialog.show() sys.exit(application.exec_())