From c769a05408ab948bdd95c6fc3fd569f78fdb9dd4 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 4 Nov 2016 09:41:26 +0100 Subject: [PATCH 1/3] Added start & stop camera interface CURA-2411 --- cura/PrinterOutputDevice.py | 14 ++++++++++++++ resources/qml/Cura.qml | 10 ++++++++++ 2 files changed, 24 insertions(+) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index bbf35da6f8..f90566c30b 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -134,6 +134,20 @@ class PrinterOutputDevice(QObject, OutputDevice): def _setJobState(self, job_state): Logger.log("w", "_setJobState is not implemented by this output device") + @pyqtSlot() + def startCamera(self): + self._startCamera() + + def _startCamera(self, job_state): + Logger.log("w", "_startCamera is not implemented by this output device") + + @pyqtSlot() + def stopCamera(self): + self._stopCamera() + + def _stopCamera(self, job_state): + Logger.log("w", "_stopCamera is not implemented by this output device") + @pyqtProperty(str, notify = jobNameChanged) def jobName(self): return self._job_name diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 5c56abcc12..77a383ab0d 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -402,6 +402,16 @@ UM.MainWindow anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenterOffset: - UM.Theme.getSize("sidebar").width / 2 visible: base.monitoringPrint + onVisibleChanged: + { + if(visible) + { + Cura.MachineManager.printerOutputDevices[0].startCamera() + } else + { + Cura.MachineManager.printerOutputDevices[0].stopCamera() + } + } source: { if(!base.monitoringPrint) From 3d30762c418cd8bac3d3c6db45643b4f42c49425 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 4 Nov 2016 09:53:14 +0100 Subject: [PATCH 2/3] Improved difference between active and passive infill icons CURA-2768 --- resources/qml/SidebarSimple.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index a2fff9ea75..e353742c72 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -126,7 +126,7 @@ Item { return UM.Theme.getColor("setting_control_disabled_text") } - return UM.Theme.getColor("text") + return UM.Theme.getColor("setting_control_disabled_text") } } From 720f37b17feed04826916a3dcd790bfc18fd5dc3 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 4 Nov 2016 10:02:13 +0100 Subject: [PATCH 3/3] Quality changes can now only be removed if they are not in use anywere CURA-2846 --- cura/Settings/ContainerManager.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index a51f9823cc..fa32b67845 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -261,8 +261,9 @@ class ContainerManager(QObject): @pyqtSlot(str, result = bool) def isContainerUsed(self, container_id): - UM.Logger.log("d", "Checking if container %s is currently used in the active stacks", container_id) - for stack in cura.Settings.ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks(): + UM.Logger.log("d", "Checking if container %s is currently used", container_id) + containers = self._container_registry.findContainerStacks() + for stack in containers: if container_id in [child.getId() for child in stack.getContainers()]: UM.Logger.log("d", "The container is in use by %s", stack.getId()) return True