Properly refresh the document when the last window is closed

This commit is contained in:
Michael Becker 2014-06-02 15:03:53 -04:00
parent 36c635f540
commit fde515b6b7

View File

@ -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