improved perfs and event management

This commit is contained in:
Martino Ferrari committed 2026-10-13 23:00:42 +02:00
1 parent 667ed0c100
commit bb99be5889
17 files changed
+626 -59

No files matched your search

+13 -1
View File
@@ -452,7 +452,19 @@ void RowSet::set_time_window(double seconds) {
// `{0, window}` here instead would state an offset of a whole epoch.
figure_->set_x_link_range(x_group_, {newest - window_s_, newest});
} else {
figure_->set_x_link_range(x_group_, {0.0, window_s_});
// No edge to read: there are no samples bound yet, which is the state every structural
// change leaves behind -- a re-plan drops the rings' history, and this function is called
// from `apply_time_window()`, which is what re-plans. So this is not a rare fallback; it
// is the axis a mode change is drawn with until the first sample lands.
//
// Which is why it states the window the same way the branch above does, with its maximum
// *at* the edge the live view puts at x = 0. `{0, window}` -- what it asked for before --
// is an offset of a whole window by the rule the comment above states, so the frames
// between the re-plan and the first sample drew the time base one screen to the left of
// where the following frames drew it. Two or three frames, every time an event or a
// waveform was opened: a trace that jumps a screen sideways and comes back is the
// "the time base flickers and it is unusable" report.
figure_->set_x_link_range(x_group_, {-window_s_, 0.0});
}
}