[studio] Fix Studio to clear editor pointers when opening a new project
All checks were successful
Build / build (push) Successful in 1m20s

This commit is contained in:
2025-06-21 14:11:34 -05:00
parent baf5fa3199
commit 0efed70b57
2 changed files with 4 additions and 0 deletions

View File

@ -649,6 +649,9 @@ ox::Error StudioUI::openProjectPath(ox::StringParam path) noexcept {
ox::make_unique_catch<Project>(keelCtx(m_tctx), std::move(path), m_projectDataDir)
.moveTo(m_project));
m_sctx.project = m_project.get();
m_activeEditor = nullptr;
m_activeEditorOnLastDraw = nullptr;
m_activeEditorUpdatePending = nullptr;
turbine::setWindowTitle(
m_tctx, ox::sfmt("{} - {}", keelCtx(m_tctx).appName, m_project->projectPath()));
m_deleteConfirmation.deleteFile.connect(m_sctx.project, &Project::deleteItem);