未验证 提交 15d9336f 编写于 作者: J Joao Moreno

EditorPart: propagate boundary sashes

上级 52cd8398
......@@ -31,6 +31,7 @@ import { Parts, IWorkbenchLayoutService } from 'vs/workbench/services/layout/bro
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { MementoObject } from 'vs/workbench/common/memento';
import { assertIsDefined } from 'vs/base/common/types';
import { IBoundarySashes } from 'vs/base/browser/ui/grid/gridview';
interface IEditorPartUIState {
serializedGrid: ISerializedGrid;
......@@ -947,11 +948,15 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro
}
private doSetGridWidget(gridWidget: SerializableGrid<IEditorGroupView>): void {
let boundarySashes: IBoundarySashes = {};
if (this.gridWidget) {
boundarySashes = this.gridWidget.boundarySashes;
this.gridWidget.dispose();
}
this.gridWidget = gridWidget;
this.gridWidget.boundarySashes = boundarySashes;
this.gridWidgetView.gridWidget = gridWidget;
this._onDidSizeConstraintsChange.input = gridWidget.onDidChange;
......@@ -972,6 +977,10 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro
return this.groupViews.size === 1 && this._activeGroup.isEmpty;
}
setBoundarySashes(sashes: IBoundarySashes): void {
this.gridWidget.boundarySashes = sashes;
}
layout(width: number, height: number): void {
// Layout contents
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册