From 13561bdb46f9371613cb62edfd2b76bb8f7a9bad Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 30 Mar 2017 10:47:11 +0200 Subject: [PATCH 1/3] material_amounts is now defined in init Somehow this was forgotten, which could cause issues in certain cases. CURA-3617 --- cura/PrintInformation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index 15cae19ec9..0369f536fa 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -75,6 +75,8 @@ class PrintInformation(QObject): Application.getInstance().getMachineManager().activeMaterialChanged.connect(self._onActiveMaterialChanged) self._onActiveMaterialChanged() + self._material_amounts = [] + currentPrintTimeChanged = pyqtSignal() preSlicedChanged = pyqtSignal() From f7bbb243b8ca81e14b774ef17b8d29a7a1d83956 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 28 Mar 2017 13:14:47 +0200 Subject: [PATCH 2/3] Moved authentication request state change --- plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py index 323f51dafe..8c722b0b01 100644 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py @@ -852,7 +852,6 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): url = QUrl("http://" + self._address + self._api_prefix + "auth/request") request = QNetworkRequest(url) request.setHeader(QNetworkRequest.ContentTypeHeader, "application/json") - self.setAuthenticationState(AuthState.AuthenticationRequested) self._manager.post(request, json.dumps({"application": "Cura-" + Application.getInstance().getVersion(), "user": self._getUserName()}).encode()) ## Send all material profiles to the printer. @@ -1033,7 +1032,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): if "/auth/request" in reply_url: # We got a response to requesting authentication. data = json.loads(bytes(reply.readAll()).decode("utf-8")) - + self.setAuthenticationState(AuthState.AuthenticationRequested) global_container_stack = Application.getInstance().getGlobalContainerStack() if global_container_stack: # Remove any old data. Logger.log("d", "Removing old network authentication data as a new one was requested.") From cd5e8830107d0eb0b5addbc725aca41feba7fa4e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 30 Mar 2017 11:24:01 +0200 Subject: [PATCH 3/3] Build volume now uses IsSlicable decorator to check for scene changes CURA-3608 Fixes #1598 --- cura/BuildVolume.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index b9c6527092..4fb1a717cd 100755 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -110,7 +110,7 @@ class BuildVolume(SceneNode): def _onChangeTimerFinished(self): root = Application.getInstance().getController().getScene().getRoot() - new_scene_objects = set(node for node in BreadthFirstIterator(root) if node.getMeshData() and type(node) is SceneNode) + new_scene_objects = set(node for node in BreadthFirstIterator(root) if node.callDecoration("isSliceable")) if new_scene_objects != self._scene_objects: for node in new_scene_objects - self._scene_objects: #Nodes that were added to the scene. node.decoratorsChanged.connect(self._onNodeDecoratorChanged)