mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06: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
1 changed files with 7 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue