From 60758093f1ac7511f4f72daeb1c13fc235b8257e Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Thu, 15 Aug 2019 21:29:20 +0200 Subject: [PATCH] Determine skeleton loading properly --- plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml | 2 +- plugins/UM3NetworkPrinting/resources/qml/MonitorStage.qml | 2 +- .../src/UltimakerNetworkedPrinterOutputDevice.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml index 6b3a9078c9..ce692168c3 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml @@ -187,7 +187,7 @@ Item } model: { - if (OutputDevice.receivedPrintJobs) + if (OutputDevice.receivedData) { return OutputDevice.queuedPrintJobs } diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorStage.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorStage.qml index d8ffba547a..47c45f8b11 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorStage.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorStage.qml @@ -52,7 +52,7 @@ Component id: carousel printers: { - if (OutputDevice.receivedPrintJobs) + if (OutputDevice.receivedData) { return OutputDevice.printers } diff --git a/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterOutputDevice.py index fd8b71fa80..02ce91800d 100644 --- a/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterOutputDevice.py @@ -103,9 +103,9 @@ class UltimakerNetworkedPrinterOutputDevice(NetworkedPrinterOutputDevice): return [print_job for print_job in self._print_jobs if print_job.assignedPrinter is not None and print_job.state not in self.QUEUED_PRINT_JOBS_STATES] - @pyqtProperty(bool, notify=printJobsChanged) - def receivedPrintJobs(self) -> bool: - return bool(self._print_jobs) + @pyqtProperty(bool, notify=_clusterPrintersChanged) + def receivedData(self) -> bool: + return self._has_received_printers # Get the amount of printers in the cluster. @pyqtProperty(int, notify=_clusterPrintersChanged)