From bedc0ab4139c474f2b44ac485aece476ff0d770e Mon Sep 17 00:00:00 2001 From: John Lewin Date: Wed, 26 Dec 2018 16:42:48 -0800 Subject: [PATCH] Close connection on printer tab close - Issue MatterHackers/MCCentral#4752 Printer still connected and printing after tab is closed --- MatterControlLib/ApplicationView/ApplicationController.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MatterControlLib/ApplicationView/ApplicationController.cs b/MatterControlLib/ApplicationView/ApplicationController.cs index a540cb6e3..f21f977db 100644 --- a/MatterControlLib/ApplicationView/ApplicationController.cs +++ b/MatterControlLib/ApplicationView/ApplicationController.cs @@ -457,6 +457,9 @@ namespace MatterHackers.MatterControl // Actually clear printer ProfileManager.Instance.ClosePrinter(printer.Settings.ID); + // Shutdown the printer connection + printer.Connection.Disable(); + if (allowChangedEvent) { if (this.Workspaces.FirstOrDefault(w => w.Printer?.Settings.ID == printer.Settings.ID) is PartWorkspace workspace)