Fix dock window title to properly update on decoration UI

This commit is contained in:
2026-04-18 23:44:43 +02:00
parent 641f70d4ac
commit 0ef35ce257
2 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ namespace FlaxEditor.GUI.Docking
// Check if is docked to the floating window and is selected so update window title
if (IsSelected && _dockedTo is FloatWindowDockPanel floatPanel)
{
floatPanel.Window.Title = Title;
floatPanel.UpdateTitle(_title);
}
}
}
@@ -200,6 +200,14 @@ namespace FlaxEditor.GUI.Docking
Dispose();
}
internal void UpdateTitle(string title)
{
_window.Title = title;
var decorations = Parent.GetChild<FloatWindowDecorations>();
if (decorations != null)
decorations.PerformLayout();
}
/// <inheritdoc />
public override bool IsFloating => true;
@@ -227,10 +235,7 @@ namespace FlaxEditor.GUI.Docking
if (_window != null && SelectedTab != null)
{
_window.Title = SelectedTab.Title;
var decorations = Parent.GetChild<FloatWindowDecorations>();
if (decorations != null)
decorations.PerformLayout();
UpdateTitle(SelectedTab.Title);
}
}