Skip to content

feat(zones): size zones in px or cm, with Session Review's scale - #243

Merged
gbradham merged 1 commit into
mainfrom
feat/zone-size-units
Nov 3, 2026
Merged

gbradham merged 1 commit into
mainfrom
feat/zone-size-units

Conversation

@gbradham

@gbradham gbradham commented Nov 3, 2026

Copy link
Copy Markdown
Member

Summary

  • The zone editor's fixed-size row gets a px / cm picker instead of a fixed unit label. cm is disabled (with a tooltip saying why) until a calibration can convert it; the choice is remembered, and each unit keeps its own last width/height.
  • Session Review now passes the shown session's calibration to the zone editor (draw zones and redraw nest): its drawn arena when there is one (cm laid out on the floor, perspective-correct), else its px/mm as a plain FrameScale, else none (px only).
  • The editor's Information box shows the scale in use (px/cm).

Testing

  • 8 new tests across test_zone_dialog_move_and_size.py and test_analysis_window.py; ruff and black clean.
  • tests/unit/gui + tests/unit/vision: 3479 passed, 1 failed — test_every_pi_section_fits_480, which fails identically on main (the metadata section is 486 px). The compact zone editor measures 412 px.

The zone editor's fixed size gets a px/cm picker; cm is enabled once a
calibration can convert it, and the choice is remembered. Session Review
now hands the editor the session's arena, else its px/mm, so zones drawn
on a recorded video can be sized in centimetres. The Information box
shows the scale in use.
@gbradham
gbradham merged commit 18becd0 into main Nov 3, 2026
2 of 4 checks passed
@gbradham
gbradham deleted the feat/zone-size-units branch November 3, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant