Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed May 7, 2020
1 parent d7a5b18 commit d179acd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/vs/workbench/browser/parts/views/viewsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,10 @@ export class ViewsService extends Disposable implements IViewsService {
this.deregisterViewletOrPanel(container, location);
}
for (const { container, location } of added) {
this.registerViewletOrPanel(container, location);
this.onDidRegisterViewContainer(container, location);
}
}

private onDidChangeContainerLocation(viewContainer: ViewContainer, from: ViewContainerLocation, to: ViewContainerLocation): void {
this.deregisterViewletOrPanel(viewContainer, from);
this.registerViewletOrPanel(viewContainer, to);
}

private onDidRegisterViewContainer(viewContainer: ViewContainer, viewContainerLocation: ViewContainerLocation): void {
this.registerViewletOrPanel(viewContainer, viewContainerLocation);
const viewContainerModel = this.viewDescriptorService.getViewContainerModel(viewContainer);
Expand All @@ -146,6 +141,11 @@ export class ViewsService extends Disposable implements IViewsService {
}));
}

private onDidChangeContainerLocation(viewContainer: ViewContainer, from: ViewContainerLocation, to: ViewContainerLocation): void {
this.deregisterViewletOrPanel(viewContainer, from);
this.registerViewletOrPanel(viewContainer, to);
}

private onViewDescriptorsAdded(views: ReadonlyArray<IViewDescriptor>, container: ViewContainer): void {
const location = this.viewDescriptorService.getViewContainerLocation(container);
if (location === null) {
Expand Down

0 comments on commit d179acd

Please sign in to comment.