improving closing logic

This commit is contained in:
Lars Brubaker 2022-12-05 10:46:49 -08:00
parent 6bc5c444dc
commit da8420bb5e
3 changed files with 4 additions and 4 deletions

View file

@ -200,7 +200,7 @@ namespace MatterHackers.MatterControl
// msGraph.Draw(MatterHackers.Agg.Transform.Affine.NewIdentity(), graphics2D); // msGraph.Draw(MatterHackers.Agg.Transform.Affine.NewIdentity(), graphics2D);
} }
public override void OnClosing(ClosingEventArgs eventArgs) public override void OnShouldClose(ShouldCloseEventArgs eventArgs)
{ {
if (this.HasBeenClosed) if (this.HasBeenClosed)
{ {

View file

@ -159,7 +159,7 @@ namespace MatterHackers.MatterControl
} }
} }
public override void OnClosing(ClosingEventArgs eventArgs) public override void OnShouldClose(ShouldCloseEventArgs eventArgs)
{ {
if (this.ActiveStage != null if (this.ActiveStage != null
&& !closeConfirmed) && !closeConfirmed)
@ -174,7 +174,7 @@ namespace MatterHackers.MatterControl
}); });
} }
base.OnClosing(eventArgs); base.OnShouldClose(eventArgs);
} }
private void ConditionalAbort(string message, Action exitConfirmedAction) private void ConditionalAbort(string message, Action exitConfirmedAction)

@ -1 +1 @@
Subproject commit bd8fded90fb758b6b80817cf2e966ee2f058e5ac Subproject commit 5ea0c5dcc6ec4d87de9474f70bca3a7afe275f96