Skip to content

Commit 1573e4e

Browse files
authored
Don't auto-close one of our restored scene tabs on startup (#3932)
1 parent caef441 commit 1573e4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

engine/Sandbox.Tools/Scene/Session/SceneEditorSession.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ internal static void OnEditorWindowRestoreLayout()
8888
// So we need to show and dock them
8989

9090
// Restoring will open a blank SceneDock as an area for the others to dock on
91-
var dummy = All.Where( x => EditorWindow.DockManager.IsDockOpen( x.SceneDock ) ).FirstOrDefault();
91+
var dummy = All.Where( x => x.Scene.Source is null && EditorWindow.DockManager.IsDockOpen( x.SceneDock ) ).FirstOrDefault();
9292

9393
foreach ( var entry in All )
9494
{
@@ -100,7 +100,7 @@ internal static void OnEditorWindowRestoreLayout()
100100

101101
// Remove our dummy dock, unless it's the only one open somehow
102102
if ( All.Count > 1 )
103-
dummy.Destroy();
103+
dummy?.Destroy();
104104
}
105105

106106
void Dock()

0 commit comments

Comments
 (0)