mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 19:39:03 +08:00
After enabling the video strem from a printer the first image is Null
CURA-5612
This commit is contained in:
parent
e74aa6dcc9
commit
aadbebd457
@ -12,7 +12,13 @@ class CameraImageProvider(QQuickImageProvider):
|
|||||||
def requestImage(self, id, size):
|
def requestImage(self, id, size):
|
||||||
for output_device in Application.getInstance().getOutputDeviceManager().getOutputDevices():
|
for output_device in Application.getInstance().getOutputDeviceManager().getOutputDevices():
|
||||||
try:
|
try:
|
||||||
return output_device.activePrinter.camera.getImage(), QSize(15, 15)
|
|
||||||
|
image = output_device.activePrinter.camera.getImage()
|
||||||
|
|
||||||
|
if image.isNull():
|
||||||
|
return QImage(), QSize(15, 15)
|
||||||
|
|
||||||
|
return image, QSize(15, 15)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
return QImage(), QSize(15, 15)
|
return QImage(), QSize(15, 15)
|
Loading…
x
Reference in New Issue
Block a user