提交 c516a4f2 编写于 作者: J Joao Moreno

fix indent guides on refresh

上级 3f3e0a53
......@@ -358,6 +358,7 @@ class TreeRenderer<T, TFilterData, TTemplateData> implements IListRenderer<ITree
private onDidChangeActiveNodes(nodes: ITreeNode<T, TFilterData>[]): void {
const set = new Set<ITreeNode<T, TFilterData>>();
nodes.forEach(node => {
if (node.parent) {
set.add(node.parent);
......@@ -1148,7 +1149,6 @@ export abstract class AbstractTree<T, TFilterData, TRef> implements IDisposable
this.focus = new Trait(_options.identityProvider);
this.selection = new Trait(_options.identityProvider);
onDidChangeActiveNodes.input = Event.map(Event.any(this.focus.onDidChange, this.selection.onDidChange), () => [...this.focus.getNodes(), ...this.selection.getNodes()]);
this.view = new TreeNodeList(container, treeDelegate, this.renderers, this.focus, this.selection, { ...asListOptions(() => this.model, _options), tree: this });
this.model = this.createModel(this.view, _options);
......@@ -1159,6 +1159,8 @@ export abstract class AbstractTree<T, TFilterData, TRef> implements IDisposable
this.selection.onDidModelSplice(e);
}, null, this.disposables);
onDidChangeActiveNodes.input = Event.map(Event.any<any>(this.focus.onDidChange, this.selection.onDidChange, this.model.onDidSplice), () => [...this.focus.getNodes(), ...this.selection.getNodes()]);
if (_options.keyboardSupport !== false) {
const onKeyDown = Event.chain(this.view.onKeyDown)
.filter(e => !isInputElement(e.target as HTMLElement))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册