未验证 提交 0e781460 编写于 作者: J Jean Pierre 提交者: GitHub

Avoid calling layout during flipNode.

Fixes #89943
上级 56fc560e
...@@ -380,7 +380,7 @@ class BranchNode implements ISplitView<ILayoutContext>, IDisposable { ...@@ -380,7 +380,7 @@ class BranchNode implements ISplitView<ILayoutContext>, IDisposable {
throw new Error('Invalid index'); throw new Error('Invalid index');
} }
this.splitview.addView(node, size, index); this.splitview.addView(node, size, index, skipLayout);
this._addChild(node, index); this._addChild(node, index);
this.onDidChildrenChange(); this.onDidChildrenChange();
} }
...@@ -791,7 +791,7 @@ function flipNode<T extends Node>(node: T, size: number, orthogonalSize: number) ...@@ -791,7 +791,7 @@ function flipNode<T extends Node>(node: T, size: number, orthogonalSize: number)
newSize += size - totalSize; newSize += size - totalSize;
} }
result.addChild(flipNode(child, orthogonalSize, newSize), newSize, 0); result.addChild(flipNode(child, orthogonalSize, newSize), newSize, 0, true);
} }
return result as T; return result as T;
......
...@@ -331,8 +331,8 @@ export class SplitView<TLayoutContext = undefined> extends Disposable { ...@@ -331,8 +331,8 @@ export class SplitView<TLayoutContext = undefined> extends Disposable {
} }
} }
addView(view: IView<TLayoutContext>, size: number | Sizing, index = this.viewItems.length): void { addView(view: IView<TLayoutContext>, size: number | Sizing, index = this.viewItems.length, skipLayout?: boolean): void {
this.doAddView(view, size, index, false); this.doAddView(view, size, index, skipLayout);
} }
removeView(index: number, sizing?: Sizing): IView<TLayoutContext> { removeView(index: number, sizing?: Sizing): IView<TLayoutContext> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册