diff --git a/ChangeLog.txt b/ChangeLog.txt index 1211d39e5..a8243fcf6 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,6 @@ # Version 0.7.37 (unreleased) - Fix Tape crash on Mac OS X. +- Fix issue in VAbstractCurve::CurveIntersectAxis. # Version 0.7.36 October 24, 2020 - [#892] Show tooltip for piece node point. diff --git a/src/libs/vgeometry/vabstractcurve.cpp b/src/libs/vgeometry/vabstractcurve.cpp index 8a818a165..b47699d2f 100644 --- a/src/libs/vgeometry/vabstractcurve.cpp +++ b/src/libs/vgeometry/vabstractcurve.cpp @@ -464,6 +464,13 @@ bool VAbstractCurve::CurveIntersectAxis(const QPointF &point, qreal angle, const { SCASSERT(intersectionPoint != nullptr) + // Normalize an angle + { + QLineF line(QPointF(10,10), QPointF(100, 10)); + line.setAngle(angle); + angle = line.angle(); + } + QRectF rec = QRectF(0, 0, INT_MAX, INT_MAX); rec.translate(-INT_MAX/2.0, -INT_MAX/2.0);