Fix error when docking to sides of tabbed panel

This commit is contained in:
2025-01-06 01:30:32 +02:00
parent 55a0a39881
commit c3ffbe2f42

View File

@@ -149,6 +149,8 @@ namespace FlaxEditor.GUI.Docking
var selectedTab = _toMove.SelectedTab;
// Dock the first tab into the target location
if (_toMove.TabsCount > 0)
{
var firstTab = _toMove.GetTab(0);
firstTab.Show(_toSet, _toDock);
@@ -157,6 +159,7 @@ namespace FlaxEditor.GUI.Docking
{
_toMove.GetTab(0).Show(DockState.DockFill, firstTab);
}
}
// Keep selected tab being selected
selectedTab?.SelectTab();