mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Unsasigned jobs are now also removed from list
CL-541
This commit is contained in:
parent
4cb7bc03ad
commit
2e8ae5c590
1 changed files with 7 additions and 3 deletions
|
@ -275,6 +275,7 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
||||||
|
|
||||||
# Check what jobs need to be removed.
|
# Check what jobs need to be removed.
|
||||||
removed_jobs = [print_job for print_job in self._print_jobs if print_job not in print_jobs_seen]
|
removed_jobs = [print_job for print_job in self._print_jobs if print_job not in print_jobs_seen]
|
||||||
|
|
||||||
for removed_job in removed_jobs:
|
for removed_job in removed_jobs:
|
||||||
job_list_changed |= self._removeJob(removed_job)
|
job_list_changed |= self._removeJob(removed_job)
|
||||||
|
|
||||||
|
@ -371,12 +372,15 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
||||||
extruder.updateActiveMaterial(material)
|
extruder.updateActiveMaterial(material)
|
||||||
|
|
||||||
def _removeJob(self, job):
|
def _removeJob(self, job):
|
||||||
|
if job not in self._print_jobs:
|
||||||
|
return False
|
||||||
|
|
||||||
if job.assignedPrinter:
|
if job.assignedPrinter:
|
||||||
job.assignedPrinter.updateActivePrintJob(None)
|
job.assignedPrinter.updateActivePrintJob(None)
|
||||||
job.stateChanged.disconnect(self._printJobStateChanged)
|
job.stateChanged.disconnect(self._printJobStateChanged)
|
||||||
self._print_jobs.remove(job)
|
self._print_jobs.remove(job)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
return False
|
|
||||||
|
|
||||||
def _removePrinter(self, printer):
|
def _removePrinter(self, printer):
|
||||||
self._printers.remove(printer)
|
self._printers.remove(printer)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue