From 9c5c98e8f321ce3c6f6f3b724ba857d9eac0d9cf Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Mon, 7 Apr 2025 21:06:37 +0300 Subject: [PATCH 1/4] Fix docked asset windows not getting restored after scripts compilation --- Source/Editor/Windows/Assets/AssetEditorWindow.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Editor/Windows/Assets/AssetEditorWindow.cs b/Source/Editor/Windows/Assets/AssetEditorWindow.cs index 12aeb50a7..8d2c81b7f 100644 --- a/Source/Editor/Windows/Assets/AssetEditorWindow.cs +++ b/Source/Editor/Windows/Assets/AssetEditorWindow.cs @@ -141,6 +141,8 @@ namespace FlaxEditor.Windows.Assets /// protected override void OnClose() { + ScriptsBuilder.ScriptsReloadBegin -= OnScriptsReloadBegin; + if (_item != null) { // Ensure to remove linkage to the item @@ -170,6 +172,7 @@ namespace FlaxEditor.Windows.Assets if (!IsHidden) { Editor.Instance.Windows.AddToRestore(this); + Close(); } } From 063f3c69ad1f159983c0e0bc3a2106ffa57a9377 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Mon, 7 Apr 2025 21:10:49 +0300 Subject: [PATCH 2/4] Fix error when Control state is cleared during scripts reload --- Source/Engine/UI/GUI/Control.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Engine/UI/GUI/Control.cs b/Source/Engine/UI/GUI/Control.cs index f1a3c2b18..3ef604323 100644 --- a/Source/Engine/UI/GUI/Control.cs +++ b/Source/Engine/UI/GUI/Control.cs @@ -424,7 +424,7 @@ namespace FlaxEngine.GUI private void OnUpdateTooltip(float deltaTime) { - Tooltip.OnMouseOverControl(this, deltaTime); + Tooltip?.OnMouseOverControl(this, deltaTime); } /// @@ -742,7 +742,7 @@ namespace FlaxEngine.GUI // Update tooltip if (ShowTooltip && OnTestTooltipOverControl(ref location)) { - Tooltip.OnMouseEnterControl(this); + Tooltip?.OnMouseEnterControl(this); SetUpdate(ref _tooltipUpdate, OnUpdateTooltip); } } @@ -759,14 +759,14 @@ namespace FlaxEngine.GUI { if (_tooltipUpdate == null) { - Tooltip.OnMouseEnterControl(this); + Tooltip?.OnMouseEnterControl(this); SetUpdate(ref _tooltipUpdate, OnUpdateTooltip); } } else if (_tooltipUpdate != null) { SetUpdate(ref _tooltipUpdate, null); - Tooltip.OnMouseLeaveControl(this); + Tooltip?.OnMouseLeaveControl(this); } } From 99682ea9b22bd5a3c1a4f0911398aa7a72767a6a Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Mon, 7 Apr 2025 22:06:26 +0300 Subject: [PATCH 3/4] Fix restored docked window layout being misaligned --- Source/Editor/Modules/WindowsModule.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Editor/Modules/WindowsModule.cs b/Source/Editor/Modules/WindowsModule.cs index 63b01bdcf..4f794f287 100644 --- a/Source/Editor/Modules/WindowsModule.cs +++ b/Source/Editor/Modules/WindowsModule.cs @@ -946,6 +946,7 @@ namespace FlaxEditor.Modules win.ParentDockPanel.MoveTabRight(currentTabIndex); currentTabIndex++; } + panel.PerformLayout(true); } else { From 5fa54fd0d0f2cccece52008008bbd59e248266fd Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Mon, 7 Apr 2025 22:37:45 +0300 Subject: [PATCH 4/4] Fix docked asset windows not getting restored after scripts compilation --- Source/Editor/Modules/WindowsModule.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Source/Editor/Modules/WindowsModule.cs b/Source/Editor/Modules/WindowsModule.cs index 4f794f287..034eb1dbc 100644 --- a/Source/Editor/Modules/WindowsModule.cs +++ b/Source/Editor/Modules/WindowsModule.cs @@ -838,8 +838,6 @@ namespace FlaxEditor.Modules // risk of interrupting the user's workflow by potentially selecting // background tabs. var window = win.RootWindow?.Window; - if (window == null) - return; var panel = win.ParentDockPanel; winData.SelectOnShow = panel.SelectedTab == win; winData.DockedTabIndex = 0;