Refactor editor windowing and update renderer regression
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user