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

@@ -144,11 +144,12 @@ std::vector<WorkspaceTraceEntry> SyncWorkspaceEvents(
EditorContext& context,
const EditorShellRuntime& runtime) {
std::vector<WorkspaceTraceEntry> entries = {};
context.SyncSessionFromProjectRuntime();
context.SyncSessionFromSelectionService();
if (const std::optional<std::filesystem::path> scenePath =
context.GetProjectRuntime().ConsumePendingSceneOpenPath();
scenePath.has_value()) {
context.GetSceneRuntime().OpenSceneAsset(scenePath.value());
context.SyncSessionFromSelectionService();
}
for (const HierarchyPanel::Event& event : runtime.GetHierarchyPanelEvents()) {