@@ -1582,7 +1582,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
15821582
15831583 if ( part === sideBar ) {
15841584 this . setSideBarHidden ( ! visible ) ;
1585- } else if ( part === panelPart ) {
1585+ } else if ( part === panelPart && this . stateModel . getRuntimeValue ( LayoutStateKeys . PANEL_HIDDEN ) === visible ) {
15861586 this . setPanelHidden ( ! visible , true ) ;
15871587 } else if ( part === auxiliaryBarPart ) {
15881588 this . setAuxiliaryBarHidden ( ! visible , true ) ;
@@ -1825,6 +1825,9 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
18251825 this . mainContainer . classList . remove ( LayoutClasses . SIDEBAR_HIDDEN ) ;
18261826 }
18271827
1828+ // Propagate to grid
1829+ this . workbenchGrid . setViewVisible ( this . sideBarPartView , ! hidden ) ;
1830+
18281831 // If sidebar becomes hidden, also hide the current active Viewlet if any
18291832 if ( hidden && this . paneCompositeService . getActivePaneComposite ( ViewContainerLocation . Sidebar ) ) {
18301833 this . paneCompositeService . hideActivePaneComposite ( ViewContainerLocation . Sidebar ) ;
@@ -1838,12 +1841,9 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
18381841 else if ( ! hidden && ! this . paneCompositeService . getActivePaneComposite ( ViewContainerLocation . Sidebar ) ) {
18391842 const viewletToOpen = this . paneCompositeService . getLastActivePaneCompositeId ( ViewContainerLocation . Sidebar ) ;
18401843 if ( viewletToOpen ) {
1841- this . openViewContainer ( ViewContainerLocation . Sidebar , viewletToOpen , true ) ;
1844+ this . openViewContainer ( ViewContainerLocation . Sidebar , viewletToOpen ) ;
18421845 }
18431846 }
1844-
1845- // Propagate to grid
1846- this . workbenchGrid . setViewVisible ( this . sideBarPartView , ! hidden ) ;
18471847 }
18481848
18491849 private hasViews ( id : string ) : boolean {
@@ -1965,6 +1965,9 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
19651965 this . mainContainer . classList . remove ( LayoutClasses . PANEL_HIDDEN ) ;
19661966 }
19671967
1968+ // Propagate layout changes to grid
1969+ this . workbenchGrid . setViewVisible ( this . panelPartView , ! hidden ) ;
1970+
19681971 // If panel part becomes hidden, also hide the current active panel if any
19691972 let focusEditor = false ;
19701973 if ( hidden && this . paneCompositeService . getActivePaneComposite ( ViewContainerLocation . Panel ) ) {
@@ -2005,9 +2008,6 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
20052008 return ;
20062009 }
20072010
2008- // Propagate layout changes to grid
2009- this . workbenchGrid . setViewVisible ( this . panelPartView , ! hidden ) ;
2010-
20112011 // If in process of showing, toggle whether or not panel is maximized
20122012 if ( ! hidden ) {
20132013 if ( ! skipLayout && isPanelMaximized !== panelOpensMaximized ) {
@@ -2158,6 +2158,9 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
21582158 this . mainContainer . classList . remove ( LayoutClasses . AUXILIARYBAR_HIDDEN ) ;
21592159 }
21602160
2161+ // Propagate to grid
2162+ this . workbenchGrid . setViewVisible ( this . auxiliaryBarPartView , ! hidden ) ;
2163+
21612164 // If auxiliary bar becomes hidden, also hide the current active pane composite if any
21622165 if ( hidden && this . paneCompositeService . getActivePaneComposite ( ViewContainerLocation . AuxiliaryBar ) ) {
21632166 this . paneCompositeService . hideActivePaneComposite ( ViewContainerLocation . AuxiliaryBar ) ;
@@ -2180,9 +2183,6 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
21802183 this . openViewContainer ( ViewContainerLocation . AuxiliaryBar , viewletToOpen , ! skipLayout ) ;
21812184 }
21822185 }
2183-
2184- // Propagate to grid
2185- this . workbenchGrid . setViewVisible ( this . auxiliaryBarPartView , ! hidden ) ;
21862186 }
21872187
21882188 setPartHidden ( hidden : boolean , part : Parts ) : void {
0 commit comments