From a4314638ab9825823419f88ac1cfab515d4b5ac2 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 13 Apr 2016 09:57:36 +0200 Subject: [PATCH] Added delete to printerOutput device to ensure it is properly closed CURA-1339 --- cura/PrinterOutputDevice.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index b00107b293..cc4cbb7094 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -90,6 +90,10 @@ class PrinterOutputDevice(OutputDevice): def close(self): pass + ## Ensure that close gets called when object is destroyed + def __del__(self): + self.close() + @pyqtProperty(float, notify = headPositionChanged) def headX(self): return self._head_x