提交 ccf724d6 编写于 作者: S SteVen Batten

fixes #99200

上级 eed8f816
......@@ -154,6 +154,11 @@ export class BreakpointsView extends ViewPane {
this.onBreakpointsChange();
}
}));
const containerModel = this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id)!)!;
this._register(containerModel.onDidChangeAllViewDescriptors(() => {
this.updateSize();
}));
}
public focus(): void {
......@@ -237,9 +242,11 @@ export class BreakpointsView extends ViewPane {
}
private updateSize(): void {
const containerModel = this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id)!)!;
// Adjust expanded body size
this.minimumBodySize = this.orientation === Orientation.VERTICAL ? getExpandedBodySize(this.debugService.getModel(), MAX_VISIBLE_BREAKPOINTS) : 170;
this.maximumBodySize = this.orientation === Orientation.VERTICAL ? getExpandedBodySize(this.debugService.getModel(), Number.POSITIVE_INFINITY) : Number.POSITIVE_INFINITY;
this.maximumBodySize = this.orientation === Orientation.VERTICAL && containerModel.visibleViewDescriptors.length > 1 ? getExpandedBodySize(this.debugService.getModel(), Number.POSITIVE_INFINITY) : Number.POSITIVE_INFINITY;
}
private onBreakpointsChange(): void {
......
......@@ -303,6 +303,11 @@ export class OpenEditorsView extends ViewPane {
this.listRefreshScheduler.schedule(0);
}
}));
const containerModel = this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id)!)!;
this._register(containerModel.onDidChangeAllViewDescriptors(() => {
this.updateSize();
}));
}
getActions(): IAction[] {
......@@ -446,6 +451,11 @@ export class OpenEditorsView extends ViewPane {
}
private getMaxExpandedBodySize(): number {
const containerModel = this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id)!)!;
if (containerModel.visibleViewDescriptors.length <= 1) {
return Number.POSITIVE_INFINITY;
}
return this.elementCount * OpenEditorsDelegate.ITEM_HEIGHT;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册