don't change focus to file explorer viewlet when automatically opening sql projects in the open folder (#11583)

This commit is contained in:
Kim Santiago
2020-07-30 14:50:42 -07:00
committed by GitHub
parent ee540ac89c
commit 9e5bd182bb
2 changed files with 7 additions and 3 deletions

View File

@@ -47,7 +47,7 @@ export class ProjectsController {
this.projectTreeViewProvider.load(this.projects);
}
public async openProject(projectFile: vscode.Uri): Promise<Project> {
public async openProject(projectFile: vscode.Uri, focusProject: boolean = true): Promise<Project> {
for (const proj of this.projects) {
if (proj.projectFilePath === projectFile.fsPath) {
vscode.window.showInformationMessage(constants.projectAlreadyOpened(projectFile.fsPath));
@@ -81,7 +81,10 @@ export class ProjectsController {
}
this.refreshProjectsTree();
await this.focusProject(newProject);
if (focusProject) {
await this.focusProject(newProject);
}
}
catch (err) {
// if the project didnt load - remove it from the list of open projects