Restore CloseOnIdle

- Issue MatterHackers/MCCentral#5755
Cannot access disposed object exception during application exit
- Issue MatterHackers/MCCentral#5756
Cross-Thread operation not valid exception in CommunicationStateChanged
event handlers
This commit is contained in:
John Lewin 2019-07-06 13:24:57 -07:00 committed by jlewin
parent e602c7681d
commit 931f0b9e0c
19 changed files with 24 additions and 23 deletions

View file

@ -191,7 +191,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
printerComPortError.Text = "Connection succeeded".Localize() + "!";
nextButton.Visible = true;
connectButton.Visible = false;
this?.Parent?.Close();
this?.Parent?.CloseOnIdle();
}
else if (printer.Connection.CommunicationState != CommunicationStates.AttemptingToConnect)
{