fix(views): set current project after modifying views

This commit is contained in:
kolaente 2024-03-18 14:21:52 +01:00
parent 3f8c5a5feb
commit bec9e3eb7d
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 3 additions and 0 deletions

View File

@ -216,10 +216,13 @@ export const useProjectStore = defineStore('project', () => {
const viewPos = projects.value[view.projectId].views.findIndex(v => v.id === view.id)
if (viewPos !== -1) {
projects.value[view.projectId].views[viewPos] = view
setProject(projects.value[view.projectId])
return
}
projects.value[view.projectId].views.push(view)
setProject(projects.value[view.projectId])
}
function removeProjectView(projectId: IProject['id'], viewId: IProjectView['id']) {