From dc96b837cf6bb4af9cd736aa3af08cf8279f7685 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Mon, 6 May 2024 17:42:24 +0200 Subject: [PATCH] Disposing a tree view while it's visible causes it to stay empty (#212085) Part of #212078 --- src/vs/workbench/browser/parts/views/treeView.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/workbench/browser/parts/views/treeView.ts b/src/vs/workbench/browser/parts/views/treeView.ts index 6bf667dda1074..6aaf7f3f198f2 100644 --- a/src/vs/workbench/browser/parts/views/treeView.ts +++ b/src/vs/workbench/browser/parts/views/treeView.ts @@ -346,6 +346,9 @@ abstract class AbstractTreeView extends Disposable implements ITreeView { set dataProvider(dataProvider: ITreeViewDataProvider | undefined) { if (dataProvider) { + if (this.visible) { + this.activate(); + } const self = this; this._dataProvider = new class implements ITreeViewDataProvider { private _isEmpty: boolean = true;