Small fix for slice before main window visible.

This commit is contained in:
Remco Burema 2021-01-28 11:41:46 +01:00
parent f85cad37cf
commit 35d6aad6cd
No known key found for this signature in database
GPG key ID: 215C49431D43F98C

View file

@ -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)