Commit ce73f6b
committed
halscope: fix initialization of gain/scale for new channels
This fixes a glitch introduced during the gtk2-to-gtk3 update.
To reproduce the glitch:
1. Check out the parent of this commit.
2. Build everything.
3. Remove any `autosave.halscope` file from the `configs/sim/axis`
directory.
4. Start linuxcnc with the `sim/axis/axis` config.
5. Start halscope. Select the signal `Xpos` on channel 1 and `Xvel`
on channel 2 (or whatever, this is just an example and not relevant
to the problem).
Note that the trigger arrow indicator does *not* show up in the
trace window, and the "Trigger Level" slider does *not* have any
effect (level stays at 0.0 even if you move it). This is one
symptom of the bug.
6. Switch the Trigger Run Mode to "Normal".
7. Make some motion in Axis to trigger the scope.
Note that the scope triggers but the display *doesn't* show any
traces (though the trace names show up now). This is another
symptom of the bug.
8. Quit halscope (so it writes `autosave.hal`) and restart it.
It loads the new `autosave.halscope` config file, and now
everything works. The Trigger Level slider is updated to whatever
it was left at when you quit, and if you trigger it the traces
show up as expected.
Before the gtk3 update (i.e. before #1156 was merged in commit
2ff6c6b), halscope used to force the
trigger level slider widget to run its "value changed" callback, but
that function was deprecated by gtk3 and the call was simply removed,
causing this bug. This commit calls the callback directly there instead,
so the callback can initialize the stuff it needs to.1 parent 49433d4 commit ce73f6b
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1094 | 1094 | | |
1095 | 1095 | | |
1096 | 1096 | | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
1097 | 1102 | | |
1098 | 1103 | | |
1099 | 1104 | | |
| |||
0 commit comments