@@ -178,7 +178,8 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
178178 position : Position . BOTTOM ,
179179 lastNonMaximizedWidth : 300 ,
180180 lastNonMaximizedHeight : 300 ,
181- panelToRestore : undefined as string | undefined
181+ panelToRestore : undefined as string | undefined ,
182+ restored : false
182183 } ,
183184
184185 statusBar : {
@@ -570,9 +571,10 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
570571
571572 private updatePanelPosition ( ) {
572573 const defaultPanelPosition = this . configurationService . getValue < string > ( Settings . PANEL_POSITION ) ;
573- const panelPosition = this . storageService . get ( Storage . PANEL_POSITION , StorageScope . WORKSPACE , defaultPanelPosition ) ;
574+ const panelPosition = this . storageService . get ( Storage . PANEL_POSITION , StorageScope . WORKSPACE , undefined ) ;
574575
575- this . state . panel . position = ( panelPosition === 'right' ) ? Position . RIGHT : Position . BOTTOM ;
576+ this . state . panel . restored = panelPosition !== undefined ;
577+ this . state . panel . position = ( ( panelPosition || defaultPanelPosition ) === 'right' ) ? Position . RIGHT : Position . BOTTOM ;
576578 }
577579
578580 registerPart ( part : Part ) : void {
@@ -1279,7 +1281,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
12791281 const height = this . storageService . getNumber ( Storage . GRID_HEIGHT , StorageScope . GLOBAL , workbenchDimensions . height ) ;
12801282 // At some point, we will not fall back to old keys from legacy layout, but for now, let's migrate the keys
12811283 const sideBarSize = this . storageService . getNumber ( Storage . SIDEBAR_SIZE , StorageScope . GLOBAL , this . storageService . getNumber ( 'workbench.sidebar.width' , StorageScope . GLOBAL , Math . min ( workbenchDimensions . width / 4 , 300 ) ) ) ;
1282- 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 ) ) ;
1284+ 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 ;
12831285
12841286 const titleBarHeight = this . titleBarPartView . minimumHeight ;
12851287 const statusBarHeight = this . statusBarPartView . minimumHeight ;
0 commit comments