提交 cfea9719 编写于 作者: J Joao Moreno

fixes #41970

上级 45e95c62
......@@ -990,6 +990,7 @@ export class SCMViewlet extends PanelViewlet implements IViewModel {
private el: HTMLElement;
private menus: SCMMenus;
private mainPanel: MainPanel | null = null;
private cachedMainPanelHeight: number | undefined;
private mainPanelDisposable: IDisposable = EmptyDisposable;
private _repositories: ISCMRepository[] = [];
private repositoryPanels: RepositoryPanel[] = [];
......@@ -1107,6 +1108,11 @@ export class SCMViewlet extends PanelViewlet implements IViewModel {
setVisible(visible: boolean): TPromise<void> {
const result = super.setVisible(visible);
if (!visible) {
this.cachedMainPanelHeight = this.getPanelSize(this.mainPanel);
}
this._onDidChangeVisibility.fire(visible);
return result;
}
......@@ -1195,6 +1201,12 @@ export class SCMViewlet extends PanelViewlet implements IViewModel {
// Remove unselected panels
panelsToRemove.forEach(panel => this.removePanel(panel));
// Restore main panel height
if (this.isVisible() && typeof this.cachedMainPanelHeight === 'number') {
this.resizePanel(this.mainPanel, this.cachedMainPanelHeight);
this.cachedMainPanelHeight = undefined;
}
// Resize all panels equally
const height = typeof this.height === 'number' ? this.height : 1000;
const mainPanelHeight = this.getPanelSize(this.mainPanel);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册