Fixed issue #516. Valentina crashes when use "Point intersect line and axis" instrument.
(grafted from e1677e1a2ae3eb9ddc41033299072c6b97fb2f56) --HG-- branch : release
This commit is contained in:
parent
82c5c048bf
commit
412ea278fe
|
@ -9,6 +9,7 @@
|
|||
- [#501] Rename Window->Close Window to Window->Close pattern.
|
||||
- [#515] Seam allowance wrong way.
|
||||
- [#494] Printing is not working.
|
||||
- [#516] Valentina crashes when use "Point intersect line and axis" instrument.
|
||||
|
||||
# Version 0.4.4 April 12, 2016
|
||||
- Updated measurement templates with all measurements. Added new template Aldrich/Women measurements.
|
||||
|
|
|
@ -160,7 +160,14 @@ QPointF VToolLineIntersectAxis::FindPoint(const QLineF &axis, const QLineF &line
|
|||
QLineF::IntersectType intersect = axis.intersect(line, &fPoint);
|
||||
if (intersect == QLineF::UnboundedIntersection || intersect == QLineF::BoundedIntersection)
|
||||
{
|
||||
return fPoint;
|
||||
if(axis.angle() == line.angle() || qAbs(axis.angle() - line.angle()) == 180)
|
||||
{
|
||||
return QPointF();
|
||||
}
|
||||
else
|
||||
{
|
||||
return fPoint;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -186,6 +186,10 @@ QPointF VToolTriangle::FindPoint(const QPointF &axisP1, const QPointF &axisP2, c
|
|||
{
|
||||
return QPointF();
|
||||
}
|
||||
if (axis.angle() == hypotenuse.angle() || qAbs(axis.angle() - hypotenuse.angle()) == 180)
|
||||
{
|
||||
return QPointF();
|
||||
}
|
||||
|
||||
qreal step = 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user