new_editor: isolate project panel state and harden runtime reset

This commit is contained in:
2026-04-22 00:19:35 +08:00
parent fff33185b9
commit 8bfca5e8f2
11 changed files with 144 additions and 61 deletions

View File

@@ -16,6 +16,12 @@ namespace XCEngine::UI::Editor::App {
class EditorProjectRuntime {
public:
EditorProjectRuntime() = default;
EditorProjectRuntime(const EditorProjectRuntime&) = delete;
EditorProjectRuntime& operator=(const EditorProjectRuntime&) = delete;
EditorProjectRuntime(EditorProjectRuntime&&) = delete;
EditorProjectRuntime& operator=(EditorProjectRuntime&&) = delete;
struct EditCommandTarget {
std::string itemId = {};
std::filesystem::path absolutePath = {};
@@ -38,9 +44,9 @@ public:
bool showInExplorerSelectTarget = false;
};
void Reset();
bool Initialize(const std::filesystem::path& repoRoot);
void BindSelectionService(EditorSelectionService* selectionService);
void SetFolderIcon(const ::XCEngine::UI::UITextureHandle& icon);
void Refresh();
const ProjectBrowserModel& GetBrowserModel() const;