Fix dock window title to properly update on decoration UI
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user