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:
authorRemco Burema <r.burema@ultimaker.com>2021-01-28 13:41:46 +0300
committerRemco Burema <r.burema@ultimaker.com>2021-01-28 13:41:46 +0300
commit35d6aad6cd7e8a16fbb829dcf8f0b70db12d0028 (patch)
tree435927f96c6832abb4b37ea50a5842f814644110
parentf85cad37cfe29d6172071b370ac7a5a053f0a07f (diff)
Small fix for slice before main window visible.
-rwxr-xr-xplugins/CuraEngineBackend/CuraEngineBackend.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py
index eed9d56741..355406fe62 100755
--- a/plugins/CuraEngineBackend/CuraEngineBackend.py
+++ b/plugins/CuraEngineBackend/CuraEngineBackend.py
@@ -250,6 +250,9 @@ class CuraEngineBackend(QObject, Backend):
@call_on_qt_thread # must be called from the main thread because of OpenGL
def _createSnapshot(self) -> None:
self._snapshot = None
+ if not CuraApplication.getInstance().isVisible():
+ Logger.log("w", "Attempt to create snapshot before complete initialization.")
+ return
Logger.log("i", "Creating thumbnail image (just before slice)...")
try:
self._snapshot = Snapshot.snapshot(width = 300, height = 300)