diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-03-01 12:40:27 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-03-01 12:40:27 -0500 |
| commit | e9e5c21068ab8d92b69d522a752f4362a112242b (patch) | |
| tree | f6ea257ccc6c70e3e5539fc622f604edd50a9a53 /main.c | |
| parent | ad29f3a56e4db0c56e216cd0b4a0f1bdbcc47ff8 (diff) | |
| download | volute-e9e5c21068ab8d92b69d522a752f4362a112242b.zip | |
reformat MAP when unit changes
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -187,7 +187,9 @@ map_row(mu_Context *ctx, UI *ui) { mu_layout_width(ctx, LABEL_WIDTH); mu_label(ctx, "map:"); mu_layout_width(ctx, UNIT_WIDTH); - w_select(ctx, &ui->map_unit); + if (w_select(ctx, &ui->map_unit) & MU_RES_CHANGE) { + set_map_unit(ui); + } mu_layout_width(ctx, FIELD_WIDTH); for (i = 0; i <ui->npoints; i++) { if (w_field(ctx, &ui->map[i])) { |