refactor(new_editor): streamline internal layout and command routing

This commit is contained in:
2026-04-15 19:30:58 +08:00
parent 9654f4d91a
commit df8f433fbb
84 changed files with 3250 additions and 3008 deletions

View File

@@ -0,0 +1,28 @@
#include "Workspace/WorkspaceModelInternal.h"
namespace XCEngine::UI::Editor {
UIEditorWorkspaceValidationResult ValidateUIEditorWorkspace(
const UIEditorWorkspaceModel& workspace) {
std::unordered_set<std::string> panelIds = {};
UIEditorWorkspaceValidationResult result =
Internal::ValidateNodeRecursive(workspace.root, panelIds);
if (!result.IsValid()) {
return result;
}
if (!workspace.activePanelId.empty()) {
const UIEditorWorkspacePanelState* activePanel =
FindUIEditorWorkspaceActivePanel(workspace);
if (activePanel == nullptr) {
return Internal::MakeValidationError(
UIEditorWorkspaceValidationCode::InvalidActivePanelId,
"Active panel id '" + workspace.activePanelId +
"' is missing or hidden by the current tab selection.");
}
}
return {};
}
} // namespace XCEngine::UI::Editor