From fde515b6b797a76358f19ea378be14663df6b4fc Mon Sep 17 00:00:00 2001 From: alcexhim Date: Mon, 2 Jun 2014 15:03:53 -0400 Subject: [PATCH] Properly refresh the document when the last window is closed --- .../MainWindow.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CSharp/Applications/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.cs b/CSharp/Applications/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.cs index bda05d45..0ee71e6e 100644 --- a/CSharp/Applications/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.cs +++ b/CSharp/Applications/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.cs @@ -1672,7 +1672,16 @@ namespace UniversalEditor.UserInterface.WindowsForms } } private void dcc_WindowClosed(object sender, WindowClosedEventArgs e) - { + { + if (dcc.SelectedWindow == null) + { + mvarCurrentDocument = null; + RefreshDocument(); + return; + } + if (dcc.SelectedWindow.ParentArea == null) return; + if (dcc.SelectedWindow.ParentArea.Position != DockPosition.Center) return; + RefreshDocument(); } #endregion