[nostalgia/studio] Add creation of StudioContext

This commit is contained in:
2022-02-21 20:07:25 -06:00
parent 4843e28b9a
commit 778cb78f31
2 changed files with 8 additions and 2 deletions
+2
View File
@@ -215,6 +215,8 @@ ox::Error StudioUI::openProject(const ox::String &path) noexcept {
m_ctx->rom = std::move(fs);
core::setWindowTitle(m_ctx, ox::sfmt("Nostalgia Studio - {}", path).c_str());
m_project = ox::make_unique<studio::Project>(m_ctx->rom.get(), path);
auto sctx = applicationData<studio::StudioContext>(m_ctx);
sctx->project = m_project.get();
m_project->fileAdded.connect(m_projectExplorer, &ProjectExplorer::refreshProjectTreeModel);
m_project->fileDeleted.connect(m_projectExplorer, &ProjectExplorer::refreshProjectTreeModel);
studio::editConfig<StudioConfig>(m_ctx, [&](StudioConfig *config) {