debug: breakpoints only update size if max is not inifinity
This commit is contained in:
parent
61ce8fdd49
commit
1baf892580
2 changed files with 6 additions and 3 deletions
|
@ -25,7 +25,6 @@ import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
|
|||
import { ViewLocation } from 'vs/workbench/browser/parts/views/viewsRegistry';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { Constants } from 'vs/editor/common/core/uint';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
|
||||
export class DebugViewlet extends PersistentViewsViewlet {
|
||||
|
@ -129,8 +128,9 @@ 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 ? Constants.MAX_SAFE_SMALL_INTEGER : this.breakpointView.minimumBodySize;
|
||||
this.breakpointView.maximumBodySize = allOtherCollapsed ? Number.POSITIVE_INFINITY : this.breakpointView.minimumBodySize;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -492,7 +492,10 @@ export class BreakpointsView extends ViewsViewletPanel {
|
|||
}
|
||||
|
||||
private onBreakpointsChange(): void {
|
||||
this.minimumBodySize = this.maximumBodySize = this.getExpandedBodySize();
|
||||
this.minimumBodySize = this.getExpandedBodySize();
|
||||
if (this.maximumBodySize < Number.POSITIVE_INFINITY) {
|
||||
this.maximumBodySize = this.minimumBodySize;
|
||||
}
|
||||
if (this.tree) {
|
||||
this.tree.refresh();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue