Skip to content

Commit

Permalink
fixes #40022
Browse files Browse the repository at this point in the history
  • Loading branch information
isidorn committed Dec 11, 2017
1 parent 5e840a6 commit 491f0d7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/vs/workbench/parts/debug/browser/debugViewlet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export class DebugViewlet extends PersistentViewsViewlet {

const el = parent.getHTMLElement();
DOM.addClass(el, 'debug-viewlet');
this.updateBreakpointsMaxSize();
}

public focus(): void {
Expand Down Expand Up @@ -116,6 +115,7 @@ export class DebugViewlet extends PersistentViewsViewlet {
// attach event listener to
if (panel.id === BREAKPOINTS_VIEW_ID) {
this.breakpointView = panel;
this.updateBreakpointsMaxSize();
} else {
this.panelListeners.set(panel.id, panel.onDidChange(() => this.updateBreakpointsMaxSize()));
}
Expand All @@ -128,9 +128,11 @@ export class DebugViewlet extends PersistentViewsViewlet {
}

private updateBreakpointsMaxSize(): void {
// We need to update the breakpoints view since all other views are collapsed #25384
const allOtherCollapsed = this.views.every(view => !view.isExpanded() || view === this.breakpointView);
this.breakpointView.maximumBodySize = allOtherCollapsed ? Number.POSITIVE_INFINITY : this.breakpointView.minimumBodySize;
if (this.breakpointView) {
// We need to update the breakpoints view since all other views are collapsed #25384
const allOtherCollapsed = this.views.every(view => !view.isExpanded() || view === this.breakpointView);
this.breakpointView.maximumBodySize = allOtherCollapsed ? Number.POSITIVE_INFINITY : this.breakpointView.minimumBodySize;
}
}
}

Expand Down

0 comments on commit 491f0d7

Please sign in to comment.