提交 491c6a8c 编写于 作者: J Joao Moreno

fix bad tree options update

上级 ac75421f
...@@ -264,19 +264,21 @@ class TreeRenderer<T, TFilterData, TTemplateData> implements IListRenderer<ITree ...@@ -264,19 +264,21 @@ class TreeRenderer<T, TFilterData, TTemplateData> implements IListRenderer<ITree
this.indent = clamp(options.indent, 0, 40); this.indent = clamp(options.indent, 0, 40);
} }
const renderIndentGuides = !!options.renderIndentGuides; if (typeof options.renderIndentGuides !== 'undefined') {
const renderIndentGuides = !!options.renderIndentGuides;
if (renderIndentGuides !== this._renderIndentGuides) { if (renderIndentGuides !== this._renderIndentGuides) {
this._renderIndentGuides = renderIndentGuides; this._renderIndentGuides = renderIndentGuides;
if (renderIndentGuides) { if (renderIndentGuides) {
const disposables = new DisposableStore(); const disposables = new DisposableStore();
this.activeNodes.onDidChange(this._onDidChangeActiveNodes, this, disposables); this.activeNodes.onDidChange(this._onDidChangeActiveNodes, this, disposables);
this.indentGuidesDisposable = disposables; this.indentGuidesDisposable = disposables;
this._onDidChangeActiveNodes(this.activeNodes.elements); this._onDidChangeActiveNodes(this.activeNodes.elements);
} else { } else {
this.indentGuidesDisposable.dispose(); this.indentGuidesDisposable.dispose();
}
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册