Skip to content

Commit b870c38

Browse files
committed
Update current sizing policy when plot policy changes
1 parent b20cdb8 commit b870c38

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/vs/workbench/contrib/positronPlots/browser/positronPlotsService.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,6 @@ export class PositronPlotsService extends Disposable implements IPositronPlotsSe
771771
* @param fireEvents Whether to fire events for this plot client.
772772
*/
773773
private registerPlotClient(plotClient: PlotClientInstance, fireEvents: boolean) {
774-
775774
// Add to our list of plots
776775
this._plots.push(plotClient);
777776

@@ -820,6 +819,10 @@ export class PositronPlotsService extends Disposable implements IPositronPlotsSe
820819
plotClient.register(plotClient.onDidShowPlot(() => {
821820
selectPlot();
822821
}));
822+
823+
plotClient.register(plotClient.onDidChangeSizingPolicy((policy) => {
824+
this.selectSizingPolicy(policy.id);
825+
}));
823826
}
824827

825828
/**

0 commit comments

Comments
 (0)