fix: only a window change sets the time scale; a fit states the whole of it

The time scale is more than the axis: it is also the trigger's event span, the
buffer partition and the control's readout. A zoom or a pan was already clean --
the controller writes the member axis and `clamp_to_data()` caps the span -- but
both fits moved `window_s_` alone and only restated the control. The event span
then stayed on the previous window until the next decade step or unit change
applied the fitted value for real, so one action changed the time scale twice.

`apply_window_scale()` is split out of `apply_time_window()` for the fits to use:
it moves the partition, the event span, the control and the session, and leaves
the view alone, because `set_time_window()` re-arms the live follow and would
throw a held event or a paused view back onto the stream. The fits report the
span they framed, `fit_all()` delegates its x half to `fit_x()` so the two cannot
drift, and the probe drives the menu handlers rather than `RowSet` so it sees the
half that lives there. `[fit-probe]` gained `event_span=`, which must equal
`window=` on every line.

Also moves the plotter pin to 03c41ad (three build warnings, no behaviour).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Martino FerrariandClaude Opus 4.6 committed 2026-10-05 16:12:59 +02:00
1 parent 1f6738031a
commit 9888fd9977
7 files changed
+128 -63

No files matched your search

+8
View File
@@ -1281,6 +1281,14 @@ propagated to every row. **Fit X axis** is the same re-framing without the y sca
the common case where the window should be the data's but the levels were placed by hand.
The status line acknowledges either (`x fitted to the buffered data (1.25 s)`).
Either fit **states a new time window**, and states the whole of it: the span it framed goes
through the same door a typed window does, so the trigger's event span, the buffer partition and
the window control all land on the fitted value and the control reads it back. A **zoom or a pan
never does** — a gesture moves the view inside the window and leaves the window alone, which is
what keeps a wheel from silently re-planning the buffer and dropping the history. The one thing a
fit does *not* borrow from the typed path is the live re-follow: fitting a held event or a paused
view keeps it pinned rather than throwing it back onto the stream.
**Shared x axis.** The rows are the rows of **one `plot::Figure`**, drawn by one
`plot::gtk4::PlotArea` in figure mode, and they all join a single x link group.
A gesture changes the row it landed on; `Figure::layout()` adopts that change