[nostalgia/studio] Make opening a new project close all currently open files
This commit is contained in:
parent
e4f3ec52d0
commit
0b6a36bedc
@ -236,8 +236,11 @@ ox::Error StudioUI::openProject(const ox::String &path) noexcept {
|
||||
sctx->project = m_project.get();
|
||||
m_project->fileAdded.connect(m_projectExplorer, &ProjectExplorer::refreshProjectTreeModel);
|
||||
m_project->fileDeleted.connect(m_projectExplorer, &ProjectExplorer::refreshProjectTreeModel);
|
||||
m_openFiles.clear();
|
||||
m_editors.clear();
|
||||
studio::editConfig<StudioConfig>(m_ctx, [&](StudioConfig *config) {
|
||||
config->projectPath = path;
|
||||
config->openFiles.clear();
|
||||
});
|
||||
return m_projectExplorer->refreshProjectTreeModel();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user