Only implement "open file" when you click a file node (not a folder)
This commit is contained in:
@@ -8,10 +8,12 @@ export class QueryTreeViewItem extends vscode.TreeItem {
|
||||
this.collapsibleState = this.children.length
|
||||
? vscode.TreeItemCollapsibleState.Collapsed
|
||||
: vscode.TreeItemCollapsibleState.None;
|
||||
this.command = {
|
||||
title: "Open",
|
||||
command: "vscode.open",
|
||||
arguments: [vscode.Uri.file(path)],
|
||||
};
|
||||
if (this.children.length === 0) {
|
||||
this.command = {
|
||||
title: "Open",
|
||||
command: "vscode.open",
|
||||
arguments: [vscode.Uri.file(path)],
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user