mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-04 14:07:30 +00:00
Constrain marker X position to trace data points
This commit is contained in:
parent
85c1c24294
commit
fd786c4176
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue