Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLipu Fei <lipu.fei815@gmail.com>2017-10-17 10:38:43 +0300
committerLipu Fei <lipu.fei815@gmail.com>2017-10-17 10:38:43 +0300
commit44d53237799e14b02f1ba0240dfc8a03cd7006f8 (patch)
tree910ce7f546c41fb60bd519e65da82957ed3180f9 /cura/CrashHandler.py
parent396d960f4a5095ff9a29a498720235776e59d9bb (diff)
Run crash dialog on Qt thread so the GUI gets updated correctly
CURA-4195
Diffstat (limited to 'cura/CrashHandler.py')
-rw-r--r--cura/CrashHandler.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/cura/CrashHandler.py b/cura/CrashHandler.py
index ac3a1ad32b..a78ecb8a72 100644
--- a/cura/CrashHandler.py
+++ b/cura/CrashHandler.py
@@ -15,8 +15,9 @@ import urllib.request
import urllib.error
from PyQt5.QtCore import QT_VERSION_STR, PYQT_VERSION_STR, QCoreApplication
-from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QLabel, QTextEdit, QGroupBox, QPushButton
+from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QLabel, QTextEdit, QGroupBox
+from UM.Application import Application
from UM.Logger import Logger
from UM.View.GL.OpenGL import OpenGL
from UM.i18n import i18nCatalog
@@ -275,5 +276,9 @@ class CrashHandler:
os._exit(1)
def show(self):
+ # must run the GUI code on the Qt thread, otherwise the widgets on the dialog won't react correctly.
+ Application.getInstance().callLater(self._show)
+
+ def _show(self):
self.dialog.exec_()
- os._exit(1) \ No newline at end of file
+ os._exit(1)