Skip to content

Commit e203dad

Browse files
authored
remove permanently removed composites (microsoft#159462)
1 parent c1dd46c commit e203dad

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/vs/workbench/browser/parts/panel/panelPart.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -427,18 +427,20 @@ export abstract class BasePanelPart extends CompositePart<PaneComposite> impleme
427427

428428
private onDidRegisterExtensions(): void {
429429
this.extensionsRegistered = true;
430-
this.removeNotExistingComposites();
431430

432-
this.saveCachedPanels();
433-
}
434-
435-
private removeNotExistingComposites(): void {
431+
// hide/remove composites
436432
const panels = this.getPaneComposites();
437-
for (const { id } of this.getCachedPanels()) { // should this value match viewlet (load on ctor)
433+
for (const { id } of this.getCachedPanels()) {
438434
if (panels.every(panel => panel.id !== id)) {
439-
this.hideComposite(id);
435+
if (this.viewDescriptorService.isViewContainerRemovedPermanently(id)) {
436+
this.removeComposite(id);
437+
} else {
438+
this.hideComposite(id);
439+
}
440440
}
441441
}
442+
443+
this.saveCachedPanels();
442444
}
443445

444446
private hideComposite(compositeId: string): void {

0 commit comments

Comments
 (0)