From b5c6ca097392d70579ca03186c885ee9551182f2 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 15 Mar 2017 10:00:11 +0100 Subject: [PATCH 1/2] Starting Cura when no machines added but with a model no longer causes exceptions --- cura/PrintInformation.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index 0369f536fa..1eb7aaa7dd 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -124,6 +124,9 @@ class PrintInformation(QObject): self._calculateInformation() def _calculateInformation(self): + if Application.getInstance().getGlobalContainerStack() is None: + return + # Material amount is sent as an amount of mm^3, so calculate length from that radius = Application.getInstance().getGlobalContainerStack().getProperty("material_diameter", "value") / 2 self._material_lengths = [] From f04981b08cb6d666d39b68b55ad0eee310e1120b Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Thu, 6 Apr 2017 14:06:38 +0200 Subject: [PATCH 2/2] Fixed wifi missing some lines. CURA-3664 --- plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py index 61bc3ea89f..d25fc5d8c5 100644 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py @@ -809,10 +809,10 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): return # Stop trying to zip, abort was called. if self._use_gzip: + batched_line += line # if the gcode was read from a gcode file, self._gcode will be a list of all lines in that file. # Compressing line by line in this case is extremely slow, so we need to batch them. if len(batched_line) < max_chars_per_line: - batched_line += line continue byte_array_file_data += _compress_data_and_notify_qt(batched_line)