diff --git a/cura/PrinterOutput/PrintJobOutputModel.py b/cura/PrinterOutput/PrintJobOutputModel.py index fa8bbe8673..92376ad1dd 100644 --- a/cura/PrinterOutput/PrintJobOutputModel.py +++ b/cura/PrinterOutput/PrintJobOutputModel.py @@ -44,7 +44,11 @@ class PrintJobOutputModel(QObject): def updateAssignedPrinter(self, assigned_printer: "PrinterOutputModel"): if self._assigned_printer != assigned_printer: + old_printer = self._assigned_printer self._assigned_printer = assigned_printer + if old_printer is not None: + # If the previously assigned printer is set, this job is moved away from it. + old_printer.updateActivePrintJob(None) self.assignedPrinterChanged.emit() @pyqtProperty(str, notify=keyChanged) diff --git a/cura/PrinterOutput/PrinterOutputModel.py b/cura/PrinterOutput/PrinterOutputModel.py index 0c30d8d788..8234989519 100644 --- a/cura/PrinterOutput/PrinterOutputModel.py +++ b/cura/PrinterOutput/PrinterOutputModel.py @@ -180,11 +180,14 @@ class PrinterOutputModel(QObject): def updateActivePrintJob(self, print_job): if self._active_print_job != print_job: - if self._active_print_job is not None: - self._active_print_job.updateAssignedPrinter(None) + old_print_job = self._active_print_job + if print_job is not None: print_job.updateAssignedPrinter(self) self._active_print_job = print_job + + if old_print_job is not None: + old_print_job.updateAssignedPrinter(None) self.activePrintJobChanged.emit() def updateState(self, printer_state):