Fixed camera for legacy UM3 printer again

CL-541
This commit is contained in:
Jaime van Kessel 2017-12-08 14:59:14 +01:00
parent 9ccd643f64
commit ae629e2968
4 changed files with 30 additions and 21 deletions

View file

@ -59,7 +59,6 @@ class NetworkCamera(QObject):
@pyqtSlot()
def stop(self):
self._stream_buffer = b""
self._stream_buffer_start_index = -1

View file

@ -97,7 +97,6 @@ class PrinterOutputDevice(QObject, OutputDevice):
# create the item (and fail) every time.
if not self._monitor_component:
self._createMonitorViewFromQML()
return self._monitor_item
@pyqtProperty(QObject, constant=True)

View file

@ -74,7 +74,6 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice):
self._monitor_view_qml_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "MonitorItem.qml")
self._output_controller = LegacyUM3PrinterOutputController(self)
def _onAuthenticationStateChanged(self):

View file

@ -6,6 +6,10 @@ import Cura 1.0 as Cura
Component
{
Item
{
width: maximumWidth
height: maximumHeight
Image
{
id: cameraImage
@ -14,6 +18,13 @@ Component
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
z: 1
Component.onCompleted:
{
if(OutputDevice.activePrinter != null && OutputDevice.activePrinter.camera != null)
{
OutputDevice.activePrinter.camera.start()
}
}
onVisibleChanged:
{
if(visible)
@ -39,4 +50,5 @@ Component
return "";
}
}
}
}