Fix DockWindow.IsDocked to ignore single tab floating window as docked
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user