Close connection on printer tab close

- Issue MatterHackers/MCCentral#4752
Printer still connected and printing after tab is closed
This commit is contained in:
John Lewin 2018-12-26 16:42:48 -08:00
parent b16c13bec0
commit bedc0ab413

View file

@ -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)