diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py index d17728f513..0f3a92f9d8 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py @@ -338,8 +338,10 @@ class CloudOutputDevice(NetworkedPrinterOutputDevice): for job_id in updated_job_ids: self._updateUM3PrintJobOutputModel(current_jobs[job_id], remote_jobs[job_id]) - # TODO: properly handle removed and updated printers - self.printJobsChanged.emit() + # We only have to update when jobs are added or removed + # updated jobs push their changes via their outputmodel + if len(removed_job_ids) > 0 or len(new_job_ids) > 0: + self.printJobsChanged.emit() def _addPrintJob(self, job: CloudClusterPrintJob) -> None: try: diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py index 85e734f7a3..c6134d9a63 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py @@ -1,7 +1,6 @@ # Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import json -from time import sleep from threading import Timer from typing import Dict, Optional