From 72dfc13b730a8398b9aef746664d5697a975ad50 Mon Sep 17 00:00:00 2001 From: SteVen Batten Date: Wed, 18 Dec 2019 07:27:58 -0800 Subject: [PATCH] Revert "fixes #85451" This reverts commit 8b7742fc25469fb69cb5e040d3ac185719c99f3e. --- src/vs/workbench/browser/layout.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index 02f948b1d7c..6423aeaaf75 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -178,8 +178,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi position: Position.BOTTOM, lastNonMaximizedWidth: 300, lastNonMaximizedHeight: 300, - panelToRestore: undefined as string | undefined, - restored: false + panelToRestore: undefined as string | undefined }, statusBar: { @@ -571,10 +570,9 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi private updatePanelPosition() { const defaultPanelPosition = this.configurationService.getValue(Settings.PANEL_POSITION); - const panelPosition = this.storageService.get(Storage.PANEL_POSITION, StorageScope.WORKSPACE, undefined); + const panelPosition = this.storageService.get(Storage.PANEL_POSITION, StorageScope.WORKSPACE, defaultPanelPosition); - this.state.panel.restored = panelPosition !== undefined; - this.state.panel.position = ((panelPosition || defaultPanelPosition) === 'right') ? Position.RIGHT : Position.BOTTOM; + this.state.panel.position = (panelPosition === 'right') ? Position.RIGHT : Position.BOTTOM; } registerPart(part: Part): void { @@ -1281,7 +1279,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi const height = this.storageService.getNumber(Storage.GRID_HEIGHT, StorageScope.GLOBAL, workbenchDimensions.height); // At some point, we will not fall back to old keys from legacy layout, but for now, let's migrate the keys const sideBarSize = this.storageService.getNumber(Storage.SIDEBAR_SIZE, StorageScope.GLOBAL, this.storageService.getNumber('workbench.sidebar.width', StorageScope.GLOBAL, Math.min(workbenchDimensions.width / 4, 300))); - const panelSize = this.state.panel.restored ? this.storageService.getNumber(Storage.PANEL_SIZE, StorageScope.GLOBAL, this.storageService.getNumber(this.state.panel.position === Position.BOTTOM ? 'workbench.panel.height' : 'workbench.panel.width', StorageScope.GLOBAL, workbenchDimensions.height / 3)) : workbenchDimensions.height / 3; + const panelSize = this.storageService.getNumber(Storage.PANEL_SIZE, StorageScope.GLOBAL, this.storageService.getNumber(this.state.panel.position === Position.BOTTOM ? 'workbench.panel.height' : 'workbench.panel.width', StorageScope.GLOBAL, workbenchDimensions.height / 3)); const titleBarHeight = this.titleBarPartView.minimumHeight; const statusBarHeight = this.statusBarPartView.minimumHeight;