For tool Curve intersect axis fixed wrong calculation point in case with too
small scene rect size. No code always use the biggest possible rect. --HG-- branch : develop
This commit is contained in:
parent
2cab9b4f90
commit
f97a077dcd
|
@ -149,7 +149,10 @@ VToolCurveIntersectAxis *VToolCurveIntersectAxis::Create(const quint32 _id, cons
|
||||||
QPointF VToolCurveIntersectAxis::FindPoint(const QPointF &point, qreal angle,
|
QPointF VToolCurveIntersectAxis::FindPoint(const QPointF &point, qreal angle,
|
||||||
const QSharedPointer<VAbstractCurve> &curve)
|
const QSharedPointer<VAbstractCurve> &curve)
|
||||||
{
|
{
|
||||||
QLineF axis = VGObject::BuildAxis(point, angle, qApp->getCurrentScene()->sceneRect());
|
QRectF rec = QRectF(0, 0, INT_MAX, INT_MAX);
|
||||||
|
rec.translate(-INT_MAX/2, -INT_MAX/2);
|
||||||
|
|
||||||
|
const QLineF axis = VGObject::BuildAxis(point, angle, rec);
|
||||||
QVector<QPointF> points = curve->IntersectLine(axis);
|
QVector<QPointF> points = curve->IntersectLine(axis);
|
||||||
|
|
||||||
if (points.size() > 0)
|
if (points.size() > 0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user