Fix issue in VAbstractCurve::CurveIntersectAxis.

Add normalization of the axis angle. Value must positive value between 0 and 359 degree.
This commit is contained in:
Roman Telezhynskyi 2020-10-26 10:00:51 +02:00
parent de02bedd36
commit 92028ddbc4
2 changed files with 8 additions and 0 deletions

View File

@ -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.

View File

@ -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);