diff --git a/Source/Editor/Modules/WindowsModule.cs b/Source/Editor/Modules/WindowsModule.cs index 6c4af3b2f..7944db398 100644 --- a/Source/Editor/Modules/WindowsModule.cs +++ b/Source/Editor/Modules/WindowsModule.cs @@ -821,17 +821,18 @@ namespace FlaxEditor.Modules } internal void AddToRestore(CustomEditorWindow win) - { - AddToRestore(win.Window, win.GetType(), new WindowRestoreData()); - } - - private void AddToRestore(EditorWindow win, Type type, WindowRestoreData winData) { // Validate if can restore type + var type = win.GetType(); var constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, Type.EmptyTypes, null); if (constructor == null || type.IsGenericType) return; + AddToRestore(win.Window, type, new WindowRestoreData()); + } + + private void AddToRestore(EditorWindow win, Type type, WindowRestoreData winData) + { var panel = win.ParentDockPanel; // Ensure that this window is only selected following recompilation