# HG changeset patch # User moel.mich # Date 1307194031 0 # Node ID 21504f47aedf7c76f190c736a3a17f81f8aba749 # Parent 414783d1cda978345a6bc58fdefb0fe47cb23f81 Fixed a problem preventing the plot form getting closed correctly. This did prevent the application from terminating when asked to exit by the operating system (for example at shutdown). diff -r 414783d1cda9 -r 21504f47aedf GUI/MainForm.cs --- a/GUI/MainForm.cs Mon May 23 18:14:25 2011 +0000 +++ b/GUI/MainForm.cs Sat Jun 04 13:27:11 2011 +0000 @@ -315,12 +315,17 @@ break; } }; - plotForm.Closing += delegate(object sender, CancelEventArgs e) { - if (plotLocation.Value == 0) { - showPlot.Value = false; + + plotForm.FormClosing += delegate(object sender, FormClosingEventArgs e) { + if (e.CloseReason == CloseReason.UserClosing) { + // just switch off the plotting when the user closes the form + if (plotLocation.Value == 0) { + showPlot.Value = false; + } + e.Cancel = true; } - e.Cancel = true; }; + EventHandler moveOrResizePlotForm = delegate(object sender, EventArgs e) { if (plotForm.WindowState != FormWindowState.Minimized) { settings.SetValue("plotForm.Location.X", plotForm.Bounds.X);