fix: the trigger stays editable while it is off, and the locked pane says "stream"
Two things the lock got wrong, and they are the same mistake seen twice: trigger-off was treated as "the
pane is disabled".
**The configuration was unreachable exactly when it was wanted.** `on_trigger_toggled()` set the trigger
*body* insensitive with the mode — a rule carried over from the five-revealer sidebar, where a closed pane
had nothing to edit. A trigger is configured *before* it is switched on, so switching it off to change it,
or to read what it is set to, is the ordinary way to work. The body is now never disabled; only the
*cursors'* readout still is, which is the pane whose content has nothing to show with the instruments off.
**The locked pane described a trigger that was not running.** With trigger mode off the summary is one
line — `mode: stream (trigger off)` — because the four lines it used to show (signal, condition, level,
mode) describe a trigger that is not there. With the trigger on it is those four plus whatever is not at
its default (`noise band`, `HF reject`, `pre-trigger`, `hold-off`).
The reading changes with it: `trigger panel sensitive …=1` is now a **regression guard** rather than a
state — the trigger's body is always live, so a `0` there means the settings have been locked out again.
Verified in both states, from sessions whose only difference is `trigger_enabled`:
panes: trigger=locked signals=locked body_visible=0 summary='mode: stream (trigger off)'
panes: trigger=locked signals=locked body_visible=0 summary='signal: square | condition: window, rising | level: 0.3 .. 0.6 | mode: single | pre-trigger: 20 %'
trigger panel sensitive before the probe toggled it: 1
The locked trigger pane is 72 px with the trigger off and 192 px with it on. Docs: the invariants' rule
for which body is disabled and why the trigger's is not, the `summary`'s two forms with what each means,
the README's deviation note, and the second `panes:` line renamed to say what it is — the line as the
probe found it, because only a run whose *session* has the trigger off shows the stream form.
This commit is contained in:
1 parent
4f4851f4e3
commit
796dda4ad5
7 files changed
+48
-15
No files matched your search
+18
-5
@@ -183,6 +183,18 @@ void sync_trigger_summary(App& app) {
|
||||
channel = channels[static_cast<std::size_t>(tc.channel)].name;
|
||||
}
|
||||
}
|
||||
// With trigger mode off the scope is streaming, and that is the whole of what this pane has to say:
|
||||
// the four lines below describe a trigger that is not running.
|
||||
if (!tc.enabled) {
|
||||
put("mode", "stream (trigger off)");
|
||||
for (int i = row; i < App::kTriggerSummaryRows; ++i) {
|
||||
gtk_widget_set_visible(app.trigger_summary_keys[i], FALSE);
|
||||
gtk_widget_set_visible(app.trigger_summary_values[i], FALSE);
|
||||
}
|
||||
app.dbg_trigger_summary = reading;
|
||||
gtk_widget_set_visible(app.trigger_summary, app.trigger_locked);
|
||||
return;
|
||||
}
|
||||
put("signal", channel.empty() ? std::string("none acquired") : channel);
|
||||
// The condition: the shape, and whatever qualifies it. A pulse width carries its comparison and its
|
||||
// width, which is what the shape *is*; a window carries its two levels on the line below.
|
||||
@@ -386,11 +398,12 @@ void on_trigger_toggled(GtkToggleButton* button, gpointer user) {
|
||||
if (on && signal >= 0) {
|
||||
app->model->set_signal_enabled(static_cast<std::size_t>(signal), true);
|
||||
}
|
||||
// Disabled, not hidden: a panel you can still see is a panel you can read, and the settings you
|
||||
// are about to switch back on must not vanish while you look for them. The *body* is what goes
|
||||
// insensitive and not the panel, because the panel's heading row carries the switch that turns
|
||||
// this back on -- and a control inside an insensitive parent cannot be clicked.
|
||||
gtk_widget_set_sensitive(app->trigger_body, on);
|
||||
// The panel's body stays *live* whether or not the trigger is running: a trigger is configured
|
||||
// before it is switched on, and switching it off to edit it -- or to check what it is set to --
|
||||
// is the ordinary way to work. (It used to go insensitive with the mode, which left the settings
|
||||
// unreachable exactly when a user wanted to change them.) What that costs is the reading: the
|
||||
// `trigger panel sensitive` line is now a regression guard, and a `0` there means the
|
||||
// configuration has been locked out again.
|
||||
// The event-history button is part of trigger mode and the pane it opens is *on demand*; leaving
|
||||
// trigger mode takes the button away and collapses the pane, so going back to streaming is not a
|
||||
// column of stale events beside the plot. Recording is the other half of that answer, so this is
|
||||
|
||||
Reference in new issue
Block a user