Determine skeleton loading properly

This commit is contained in:
ChrisTerBeke 2019-08-15 21:29:20 +02:00
parent 75f52c5a24
commit 60758093f1
No known key found for this signature in database
GPG Key ID: A49F1AB9D7E0C263
3 changed files with 5 additions and 5 deletions

View File

@ -187,7 +187,7 @@ Item
} }
model: model:
{ {
if (OutputDevice.receivedPrintJobs) if (OutputDevice.receivedData)
{ {
return OutputDevice.queuedPrintJobs return OutputDevice.queuedPrintJobs
} }

View File

@ -52,7 +52,7 @@ Component
id: carousel id: carousel
printers: printers:
{ {
if (OutputDevice.receivedPrintJobs) if (OutputDevice.receivedData)
{ {
return OutputDevice.printers return OutputDevice.printers
} }

View File

@ -103,9 +103,9 @@ class UltimakerNetworkedPrinterOutputDevice(NetworkedPrinterOutputDevice):
return [print_job for print_job in self._print_jobs if 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] print_job.assignedPrinter is not None and print_job.state not in self.QUEUED_PRINT_JOBS_STATES]
@pyqtProperty(bool, notify=printJobsChanged) @pyqtProperty(bool, notify=_clusterPrintersChanged)
def receivedPrintJobs(self) -> bool: def receivedData(self) -> bool:
return bool(self._print_jobs) return self._has_received_printers
# Get the amount of printers in the cluster. # Get the amount of printers in the cluster.
@pyqtProperty(int, notify=_clusterPrintersChanged) @pyqtProperty(int, notify=_clusterPrintersChanged)