提交 d808ba31 编写于 作者: B Benjamin Pasero

fix issue in restoring editors

上级 62f02722
......@@ -932,11 +932,11 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
// Validate width ratios
const positions = rightEditors.length ? 3 : centerEditors.length ? 2 : 1;
if (widthRatios.length !== positions) {
if (!widthRatios || widthRatios.length !== positions) {
if (!this.getVisibleEditors().length) {
widthRatios = (positions === 3) ? [0.33, 0.33, 0.34] : (positions === 2) ? [0.5, 0.5] : [1];
} else {
widthRatios = void 0; // being taken care of by the layouting if editors are already open
widthRatios = void 0;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册