提交 8b404334 编写于 作者: S Sandeep Somavarapu

Fix #33350

上级 5ae77d77
......@@ -403,12 +403,12 @@ export class ViewsViewlet extends Viewlet {
public getContextMenuActions(): IAction[] {
return this.getViewDescriptorsFromRegistry(true)
.filter(viewDescriptor => viewDescriptor.canToggleVisibility)
.filter(viewDescriptor => viewDescriptor.canToggleVisibility && this.contextKeyService.contextMatchesRules(viewDescriptor.when))
.map(viewDescriptor => (<IAction>{
id: `${viewDescriptor.id}.toggleVisibility`,
label: viewDescriptor.name,
checked: this.isCurrentlyVisible(viewDescriptor),
enabled: this.contextKeyService.contextMatchesRules(viewDescriptor.when),
enabled: true,
run: () => this.toggleViewVisibility(viewDescriptor.id)
}));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册