This commit is contained in:
John Lewin 2018-10-16 17:36:50 -07:00
parent fd2fd1a9d7
commit 2e9aa096e2

View file

@ -407,7 +407,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
{
UiThread.RunOnIdle(() =>
{
if (TabContent is PrinterTabPage printerTab
if (this.TabContent is PrinterTabPage printerTab
&& printerTab.printer.Connection.PrinterIsPrinting)
{
StyledMessageBox.ShowMessageBox(
@ -428,13 +428,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
"Cancel Print".Localize(),
"Continue Printing".Localize());
}
else // need to handle asking about saving a
else
{
UiThread.RunOnIdle(() =>
{
this.parentTabControl.RemoveTab(this);
this.CloseClicked?.Invoke(this, null);
});
this.parentTabControl.RemoveTab(this);
this.CloseClicked?.Invoke(this, null);
}
});
}