Refactor new editor state ownership model
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "Features/Project/ProjectBrowserModel.h"
|
||||
|
||||
#include "State/EditorSelectionService.h"
|
||||
#include "State/EditorSession.h"
|
||||
|
||||
#include <XCEngine/UI/Types.h>
|
||||
@@ -38,6 +39,7 @@ public:
|
||||
};
|
||||
|
||||
bool Initialize(const std::filesystem::path& repoRoot);
|
||||
void BindSelectionService(EditorSelectionService* selectionService);
|
||||
void SetFolderIcon(const ::XCEngine::UI::UITextureHandle& icon);
|
||||
void Refresh();
|
||||
|
||||
@@ -98,14 +100,15 @@ public:
|
||||
std::string* movedFolderId = nullptr);
|
||||
|
||||
private:
|
||||
void ApplySelection(
|
||||
const ProjectBrowserModel::AssetEntry& asset,
|
||||
bool preserveStamp);
|
||||
EditorSelectionService& SelectionService();
|
||||
const EditorSelectionService& SelectionService() const;
|
||||
void ApplySelection(const ProjectBrowserModel::AssetEntry& asset);
|
||||
void RevalidateSelection();
|
||||
bool SelectionTargetsItem(std::string_view itemId) const;
|
||||
|
||||
ProjectBrowserModel m_browserModel = {};
|
||||
EditorSelectionState m_selection = {};
|
||||
EditorSelectionService m_ownedSelectionService = {};
|
||||
EditorSelectionService* m_selectionService = &m_ownedSelectionService;
|
||||
std::optional<std::filesystem::path> m_pendingSceneOpenPath = std::nullopt;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user