Created attachment 793 [details]
Screenshot, Math1 trace overlaps A3 trace
Overview: The math channel is not drawn at the correct height, this causes the math trace to overlap another trace.
Steps to Reproduce:
1) Start Pulseview
2) Remove all traces of the demo device, except A3 (sawtooth)
3) Set the number of samples to 100, and set the samplerate to 100Hz
4) Click Run. Now channel A3 draws a sawtooth
5) Click "Add math channel". the signal trace "Math1" appears. This trace is drawn correctly, and does not overlap the A3 trace.
6) Click "Math1", and then the 4 symbols at the end of the line "expression". Now the "Math Expression Editor" appears.
7) Enter the following expression and click OK.
var themax := 0;
var thesample := A3;
if (thesample > themax)
themax := thesample;
The Math1 trace jumps up, and overlaps the A3 trace. (see the screenshot)
the A3 and Math1 traces should be drawn under each other, so the traces don't overlap
Build Date & Hardware: I build it myself on 04/15/2023 on a 64 bit AMD machine.
libsigrok 0.6.0-git/4:0:0 (rt: 0.6.0-git-5bce22ac/4:0:0)
Kernel version: $ uname -a
Linux cedric 6.2.11-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 13 Apr 2023 16:59:24 +0000 x86_64 GNU/Linux
Additional Builds and Platforms: Also seen with Windows 10 and this version:
When both traces are dragged, they move together, still overlapping. When the mouse is released, the traces are drawn correctly. When they are then drawn again, they correctly move together again.