mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-20 12:49:38 +08:00
Don't take snapshot if no main window present.
You'll need the Uranium branch of the same (fix_is_visible) name if you don't want this to crash on slicing!
This commit is contained in:
parent
a9bf3ed934
commit
f2088d7fc8
@ -250,6 +250,9 @@ class CuraEngineBackend(QObject, Backend):
|
|||||||
@call_on_qt_thread # must be called from the main thread because of OpenGL
|
@call_on_qt_thread # must be called from the main thread because of OpenGL
|
||||||
def _createSnapshot(self) -> None:
|
def _createSnapshot(self) -> None:
|
||||||
self._snapshot = None
|
self._snapshot = None
|
||||||
|
if not CuraApplication.getInstance().isVisible:
|
||||||
|
Logger.log("w", "Can't create snapshot when renderer not initialized.")
|
||||||
|
return
|
||||||
Logger.log("i", "Creating thumbnail image (just before slice)...")
|
Logger.log("i", "Creating thumbnail image (just before slice)...")
|
||||||
try:
|
try:
|
||||||
self._snapshot = Snapshot.snapshot(width = 300, height = 300)
|
self._snapshot = Snapshot.snapshot(width = 300, height = 300)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user