Merge remote-tracking branch 'origin/master' into 1.10

This commit is contained in:
Wojtek Figat
2025-03-31 16:58:25 +02:00
9 changed files with 69 additions and 51 deletions

View File

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