Facepunch / sbox-issues

173 stars 11 forks source link

Loading a editor layout makes scene views impossible to reopen without restarting. #5612

Open badandbest opened 3 months ago

badandbest commented 3 months ago

Describe the bug

When you load a editor layout it closes the scene views. You're unable to open the scenes again until you restart the game.

To Reproduce

  1. Open a scene.
  2. Reset or load a layout (e.g "Matt's Layout").
  3. All the scene views are closed and can't be reopened without a restart.

Expected behavior

Media/Files

https://github.com/Facepunch/sbox-issues/assets/91832803/e5187bad-3585-4186-998f-502ed730bf27

Additional context

No response

badandbest commented 2 months ago

Here is my review: The scene tabs aren't invisible anymore. 👍

But if you have more than one scene tab open the tabs are placed where the inspector is instead of the game view.


1 Scene tab

image

2 Scene tabs

image

only ToolWindowManagerArea can be used with this type
   at Sandbox.EngineLoop.Print(Int32 severity, String logger, String message)
   at Managed.SandboxEngine.Exports.Sandbox_EngineLoop_Print(Int32 severitty, IntPtr logger, IntPtr message)
   at Editor.DockManager.AddDock(Widget sibling, Widget window, DockArea dockArea, DockProperty properties, Single split)
   at Editor.SceneEditorSession.DockSceneTab(Widget tab)
   at Editor.SceneEditorSession.OnEditorWindowRestoreLayout()
   at Editor.EditorMainWindow.OnDockLayoutLoaded()
   at Sandbox.SandboxSystemExtensions.InvokeWithWarning(Action points)
   at Editor.DockManager.set_State(String value)
   at Editor.EditorWindowLayoutManager.<>c__DisplayClass8_0.<AddDefaultLayout>b__0() in C:\Program Files (x86)\Steam\steamapps\common\sbox\addons\tools\Code\EditorWindow\EditorWindowLayoutManager.cs:line 140
   at Editor.Option.OnTriggered()
   at Editor.Option.InternalTriggered()
   at Managed.SourceTools.Exports.Editor_Option_InternalTriggered(UInt32 self)
   at Sandbox.EngineLoop.RunFrame(CMaterialSystem2AppSystemDict appDict, Boolean& wantsQuit)
   at Sandbox.AppSystem.RunFrame()
   at Sandbox.AppSystem.Run()
   at Sandbox.Launcher.Main() in C:\build\_work\sbox\sbox\engine\Launcher\SboxDev\Launcher.cs:line 24
   at Sandbox.Program.Launch() in C:\build\_work\sbox\sbox\engine\Launcher\Shared\Startup.cs:line 21
   at Sandbox.Program.Main() in C:\build\_work\sbox\sbox\engine\Launcher\Shared\Startup.cs:line 16