mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-06 06:53:37 +00:00
Overflow/replot bugfix when moving markers
This commit is contained in:
parent
1a7212191a
commit
19bc31b7cc
2 changed files with 3 additions and 2 deletions
|
|
@ -777,8 +777,8 @@ double TraceXYPlot::nearestTracePoint(Trace *t, QPoint pixel)
|
|||
continue;
|
||||
}
|
||||
auto plotPoint = plotValueToPixel(point, 0);
|
||||
auto diff = plotPoint - pixel;
|
||||
unsigned int distance = diff.x() * diff.x() + diff.y() * diff.y();
|
||||
QPointF diff = plotPoint - pixel;
|
||||
auto distance = diff.x() * diff.x() + diff.y() * diff.y();
|
||||
if(distance < closestDistance) {
|
||||
closestDistance = distance;
|
||||
closestXpos = point.x();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue