From d2a79469ca31f225530d581d108b4a4c8bb6f1bd Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Wed, 10 Mar 2021 15:59:04 +0200 Subject: Attempt to work around job handler progress bug. --- .../PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs index 8d5bd284d..965747856 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs @@ -168,6 +168,14 @@ namespace Tango.PPC.Jobs.ViewModels /// The instance containing the event data. private void MachineOperator_PrintingStarted(object sender, PrintingEventArgs e) { + if (_handler != null) + { + _handler.StatusChanged -= JobHandler_StatusChanged; + _handler.SpoolChangeRequired -= JobHandler_SpoolChangeRequired; + _handler.Stopped -= JobHandler_Stopped; + _handler.CanCancelChanged -= JobHandler_CanCancelChanged; + } + _handler = e.JobHandler; Job = e.Job; e.JobHandler.StatusChanged += JobHandler_StatusChanged; -- cgit v1.3.1