Fix finding point of intersection curve and axis.

Add case where the axis's point lies on the curve.
This commit is contained in:
Roman Telezhynskyi 2021-07-24 11:27:50 +03:00
parent a6d9194051
commit 8ffc2447dd
2 changed files with 7 additions and 0 deletions

View File

@ -5,6 +5,7 @@
- Fix regression. Set default value for detail labels size and grainline length to 10 cm.
- [smart-pattern/valentina#136] 2 decimals for entering values in multi measurements tables.
- New warnings. Warn a user about incorrect cut curve segment length.
- Fix finding point of intersection curve and axis. Case when the axis's point lies on the curve.
# Valentina 0.7.49 July 1, 2021
- Fix crash.

View File

@ -464,6 +464,12 @@ bool VAbstractCurve::CurveIntersectAxis(const QPointF &point, qreal angle, const
{
SCASSERT(intersectionPoint != nullptr)
if (VAbstractCurve::IsPointOnCurve(curvePoints, point))
{
*intersectionPoint = point;
return true;
}
// Normalize an angle
{
QLineF line(QPointF(10,10), QPointF(100, 10));