mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 19:48:09 +00:00
index tree: prevent root from changing collapse state
This commit is contained in:
parent
174c9c69ec
commit
8a9f89c285
1 changed files with 8 additions and 4 deletions
|
@ -276,11 +276,15 @@ export class IndexTreeModel<T extends Exclude<any, undefined>, TFilterData = voi
|
|||
private _setNodeCollapseState(node: IMutableTreeNode<T, TFilterData>, collapsible: boolean, collapsed: boolean, recursive: boolean, deep: boolean): boolean {
|
||||
let result = node.collapsible !== collapsible || node.collapsed !== collapsed;
|
||||
|
||||
node.collapsible = collapsible;
|
||||
node.collapsed = collapsed;
|
||||
if (node === this.root) {
|
||||
result = false;
|
||||
} else {
|
||||
node.collapsible = collapsible;
|
||||
node.collapsed = collapsed;
|
||||
|
||||
if (result) {
|
||||
this._onDidChangeCollapseState.fire({ node, deep });
|
||||
if (result) {
|
||||
this._onDidChangeCollapseState.fire({ node, deep });
|
||||
}
|
||||
}
|
||||
|
||||
if (recursive) {
|
||||
|
|
Loading…
Reference in a new issue