Resolved issue #193. Undeletable zombie arc objects.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-04-10 14:48:34 +03:00
parent 57b06ee47f
commit f98f897fd3
2 changed files with 8 additions and 5 deletions

View file

@ -1,4 +1,5 @@
# Version 0.5.0
- [#193] Undeletable zombie arc objects.
- New feature. Groups.
- Tool "Curve intersect axis" store data about subpaths.
- [#444] Length along Path seems not valid.

View file

@ -165,14 +165,16 @@ QPointF VArc::GetP2 () const
*/
qreal VArc::AngleArc() const
{
if ((qFuzzyIsNull(d->f1) && qFuzzyCompare(d->f2, 360)) ||
(qFuzzyCompare(d->f1, 360) && qFuzzyIsNull(d->f2)))
{
return 360;
const qreal angleDiff = qAbs(d->f1 - d->f2);
if (VFuzzyComparePossibleNulls(angleDiff, 0) || VFuzzyComparePossibleNulls(angleDiff, 360))
{
return 360;
}
}
QLineF l1(0, 0, 100, 100);
QLineF l1(0, 0, 100, 0);
l1.setAngle(d->f1);
QLineF l2(0, 0, 100, 100);
QLineF l2(0, 0, 100, 0);
l2.setAngle(d->f2);
qreal ang = l1.angleTo(l2);