Migrate ProjectManager to dependency injection
- Created IProjectManager interface - ProjectManager now implements IProjectManager - Removed ProjectManager::Get() singleton - Added IEditorContext::GetProjectManager() - ProjectPanel now uses m_context->GetProjectManager() instead of singleton - EditorContext owns ProjectManager instance
This commit is contained in:
@@ -9,11 +9,6 @@ namespace fs = std::filesystem;
|
||||
namespace XCEngine {
|
||||
namespace Editor {
|
||||
|
||||
ProjectManager& ProjectManager::Get() {
|
||||
static ProjectManager instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
std::vector<AssetItemPtr>& ProjectManager::GetCurrentItems() {
|
||||
if (m_path.empty()) {
|
||||
static std::vector<AssetItemPtr> empty;
|
||||
|
||||
Reference in New Issue
Block a user