Refactor editor windowing and update renderer regression

This commit is contained in:
2026-04-26 03:41:58 +08:00
parent 68993c46bb
commit 4fcaac81d6
39 changed files with 1181 additions and 872 deletions

View File

@@ -54,6 +54,30 @@ UIEditorWindowWorkspaceController EditorWindowSystem::BuildWorkspaceMutationCont
return UIEditorWindowWorkspaceController(GetPanelRegistry(), GetWindowSet());
}
bool EditorWindowSystem::CommitLiveWindowMutation(
std::string_view windowId,
const UIEditorWorkspaceController& workspaceController,
std::string& outError) {
if (windowId.empty()) {
outError = "live window mutation missing window id";
return false;
}
UIEditorWindowWorkspaceSet nextWindowSet = GetWindowSet();
UIEditorWindowWorkspaceState* existingState =
FindMutableUIEditorWindowWorkspaceState(nextWindowSet, windowId);
if (existingState == nullptr) {
outError =
"live window mutation references unknown window '" +
std::string(windowId) + "'";
return false;
}
existingState->workspace = workspaceController.GetWorkspace();
existingState->session = workspaceController.GetSession();
return m_workspaceStore.TrySetWindowSet(std::move(nextWindowSet), outError);
}
EditorWindowSynchronizationPlan EditorWindowSystem::BuildPlanForWindowSet(
const UIEditorWindowWorkspaceSet& targetWindowSet,
const std::vector<EditorWindowHostSnapshot>& hostWindows,