mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-01-25 18:10:15 +01:00
Constrain marker X position to trace data points
This commit is contained in:
parent
85c1c24294
commit
fd786c4176
|
|
@ -839,6 +839,8 @@ void Marker::constrainPosition()
|
|||
} else if(position < parentTrace->minX()) {
|
||||
position = parentTrace->minX();
|
||||
}
|
||||
// set position to closest trace index
|
||||
position = parentTrace->sample(parentTrace->index(position)).x;
|
||||
}
|
||||
traceDataChanged();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue