From 483911dc4a5e2734d9b2fca466a0ef32335238c3 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 25 Jul 2022 16:49:48 +0200 Subject: [PATCH] Fix error of undefined property when using LAN printers This property was defined for Cloud printers, but not for Network printers. In QML this then resulted in an error saying that null cannot be assigned to a bool (for the 'visible' property). The visible property then defaulted to its default, true. And so it was always visible, but still had an error. The error is now solved so that I can also check for other properties in this visible check. Contributes to issue CURA-9220. --- .../src/Network/LocalClusterOutputDevice.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDevice.py b/plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDevice.py index 2d27b7c3be..68eebf1000 100644 --- a/plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDevice.py @@ -96,6 +96,13 @@ class LocalClusterOutputDevice(UltimakerNetworkedPrinterOutputDevice): def forceSendJob(self, print_job_uuid: str) -> None: self._getApiClient().forcePrintJob(print_job_uuid) + @pyqtProperty(bool, constant = True) + def supportsPrintJobQueue(self) -> bool: + """ + Whether this printer knows about queueing print jobs. + """ + return True # This API always supports print job queueing. + def setJobState(self, print_job_uuid: str, action: str) -> None: """Set the remote print job state.