diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-03-10 15:59:04 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-03-10 15:59:04 +0200 |
| commit | d2a79469ca31f225530d581d108b4a4c8bb6f1bd (patch) | |
| tree | cb4d63da2682b3d724251dec6dcd9ccbddd038a0 /Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs | |
| parent | d4f39ab28522fa25ec3fbd13841fd09d432f0e51 (diff) | |
| download | Tango-d2a79469ca31f225530d581d108b4a4c8bb6f1bd.tar.gz Tango-d2a79469ca31f225530d581d108b4a4c8bb6f1bd.zip | |
Attempt to work around job handler progress bug.
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs | 8 |
1 files changed, 8 insertions, 0 deletions
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 /// <param name="e">The <see cref="PrintingEventArgs"/> instance containing the event data.</param> 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; |
