Fix DockWindow.IsDocked to ignore single tab floating window as docked

This commit is contained in:
Ari Vuollet
2026-08-26 00:33:49 +03:00
parent 17df377737
commit 28d5a6d0de
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ namespace FlaxEditor.GUI.Docking
/// <summary>
/// Gets a value indicating whether this window is docked.
/// </summary>
public bool IsDocked => _dockedTo != null;
public bool IsDocked => _dockedTo != null && _dockedTo.TabsCount > 1;
/// <summary>
/// Gets a value indicating whether this window is selected.
+2 -2
View File
@@ -913,7 +913,7 @@ namespace FlaxEditor.Windows
/// </summary>
public void FocusGameViewport()
{
if (!IsDocked)
if (ParentDockPanel == null)
{
ShowFloating();
}
@@ -1018,7 +1018,7 @@ namespace FlaxEditor.Windows
Screen.CursorVisible = true;
Screen.CursorLock = CursorLockMode.None;
if (Editor.IsPlayMode && IsDocked && IsSelected && RootWindow.FocusedControl == null)
if (Editor.IsPlayMode && ParentDockPanel != null && IsSelected && RootWindow.FocusedControl == null)
{
// Game UI cleared focus so regain it to maintain UI navigation just like game window does
FlaxEngine.Scripting.InvokeOnUpdate(Focus);