Refactor new editor state ownership model

This commit is contained in:
2026-04-19 04:36:52 +08:00
parent 48bfde28e3
commit f45b34a03a
46 changed files with 1979 additions and 217 deletions

View File

@@ -123,7 +123,9 @@ void EditorShellRuntime::Update(
m_shellFrame.workspaceInteractionFrame.dockHostFrame.layout;
m_hierarchyPanel.SetSceneRuntime(&context.GetSceneRuntime());
m_hierarchyPanel.SetCommandFocusService(&context.GetCommandFocusService());
m_sceneEditCommandRoute.BindSceneRuntime(&context.GetSceneRuntime());
m_sceneViewportController.SetCommandFocusService(&context.GetCommandFocusService());
// Keep the previous render request available for readback-based picking during
// this update, then refresh it again after camera/navigation state changes.
m_viewportHostService.SetSceneViewportRenderRequest(
@@ -190,6 +192,8 @@ void EditorShellRuntime::Update(
const std::string& activePanelId = workspaceController.GetWorkspace().activePanelId;
m_projectPanel.SetProjectRuntime(&context.GetProjectRuntime());
m_projectPanel.SetCommandFocusService(&context.GetCommandFocusService());
m_inspectorPanel.SetCommandFocusService(&context.GetCommandFocusService());
m_hierarchyPanel.Update(
m_shellFrame.workspaceInteractionFrame.composeFrame.contentHostFrame,
hostedContentEvents,
@@ -208,6 +212,7 @@ void EditorShellRuntime::Update(
hostedContentEvents,
!m_shellFrame.result.workspaceInputSuppressed,
activePanelId == kInspectorPanelId);
context.SyncSessionFromCommandFocusService();
m_consolePanel.Update(
context.GetSession(),
m_shellFrame.workspaceInteractionFrame.composeFrame.contentHostFrame);