diff options
Diffstat (limited to 'Lib')
| -rw-r--r-- | Lib/defconQt/glyphView.py | 9 | 
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/defconQt/glyphView.py b/Lib/defconQt/glyphView.py index d2eac03..c96a4f1 100644 --- a/Lib/defconQt/glyphView.py +++ b/Lib/defconQt/glyphView.py @@ -432,8 +432,13 @@ class OnCurvePointItem(QGraphicsPathItem):              targetLen = children[selected-1].line().length()*2          else:              targetLen = children[selected-1].line().length()+children[propagate-1].line().length() -        tmpLine = QLineF(newValue, QPointF(0, 0)) -        tmpLine.setLength(targetLen) +        if not newValue.isNull(): +            tmpLine = QLineF(newValue, QPointF()) +            tmpLine.setLength(targetLen) +        else: +            # if newValue is null, we’d construct a zero-length line and collapse +            # both offCurves +            tmpLine = QLineF(QPointF(), children[propagate].pos())          children[propagate].setFlag(QGraphicsItem.ItemSendsGeometryChanges, False)          children[propagate].setPos(tmpLine.x2(), tmpLine.y2())          children[propagate].setFlag(QGraphicsItem.ItemSendsGeometryChanges)  | 
