From bd0b38f6885d0dabb24aa078ade2eed6425ff5ce Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 2 Oct 2017 16:55:04 +0200 Subject: [PATCH] Use self._camera_active to detect whether we should show the camera Because the camera timer is whether we should request the camera. Contributes to issue CURA-4376. --- cura/PrinterOutputDevice.py | 2 +- plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index c6e98257ba..827258ef3b 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -242,8 +242,8 @@ class PrinterOutputDevice(QObject, OutputDevice): @pyqtSlot() def stopCamera(self): - self._camera_active = False self._stopCamera() + self._camera_active = False def _stopCamera(self): Logger.log("w", "_stopCamera is not implemented by this output device") diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py index f23986f7f0..9dbe193ed4 100755 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py @@ -334,7 +334,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): else: #Camera wasn't even running. Don't try to stop it or you'll get a segfault. return - if self._image_reply: + if self._camera_active: try: self._image_reply.abort() self._image_reply.downloadProgress.disconnect(self._onStreamDownloadProgress)