diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-03-01 13:10:34 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-03-01 13:10:34 -0500 |
| commit | e374704b245fa8781c56f4d3e35ad9e93f42ae9c (patch) | |
| tree | 434de15d5398083d9f3a4c055e10cd733ee43917 /main.c | |
| parent | 86e37e20bcb08025b6e8d9ba3dd970d27f9ef077 (diff) | |
| download | volute-e374704b245fa8781c56f4d3e35ad9e93f42ae9c.zip | |
recalculate volume flow rate when unit changes
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -245,7 +245,9 @@ volume_flow_rate_row(mu_Context *ctx, UI *ui) { mu_layout_width(ctx, LABEL_WIDTH); mu_label(ctx, "volume flow rate"); mu_layout_width(ctx, UNIT_WIDTH); - w_select(ctx, &ui->volume_flow_rate_unit); + if (w_select(ctx, &ui->volume_flow_rate_unit) & MU_RES_CHANGE) { + set_all_volume_flow_rate(ui); + } mu_layout_width(ctx, FIELD_WIDTH); for (i = 0; i < ui->npoints; i++) { w_label(ctx, ui->volume_flow_rate[i]); |