Skip to content

Commit d88c763

Browse files
authored
A view with id '~remote.helpPanel' is already registered (microsoft#186895)
Fixes microsoft#186630
1 parent 480b465 commit d88c763

File tree

1 file changed

+5
-2
lines changed
  • src/vs/workbench/contrib/remote/browser

1 file changed

+5
-2
lines changed

src/vs/workbench/contrib/remote/browser/remote.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ class RemoteViewPaneContainer extends FilterViewPaneContainer implements IViewMo
583583
private _onDidChangeHelpInformation = new Emitter<void>();
584584
public onDidChangeHelpInformation: Event<void> = this._onDidChangeHelpInformation.event;
585585
private hasSetSwitchForConnection: boolean = false;
586+
private hasRegisteredHelpView: boolean = false;
586587

587588
constructor(
588589
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@@ -610,10 +611,12 @@ class RemoteViewPaneContainer extends FilterViewPaneContainer implements IViewMo
610611
this._onDidChangeHelpInformation.fire();
611612

612613
const viewsRegistry = Registry.as<IViewsRegistry>(Extensions.ViewsRegistry);
613-
if (this.helpInformation.length) {
614+
if (this.helpInformation.length && !this.hasRegisteredHelpView) {
614615
viewsRegistry.registerViews([this.helpPanelDescriptor], this.viewContainer);
615-
} else {
616+
this.hasRegisteredHelpView = true;
617+
} else if (this.hasRegisteredHelpView) {
616618
viewsRegistry.deregisterViews([this.helpPanelDescriptor], this.viewContainer);
619+
this.hasRegisteredHelpView = false;
617620
}
618621
});
619622
}

0 commit comments

Comments
 (0)