diff options
| author | Adrien Tétar | 2015-09-21 20:55:45 +0200 | 
|---|---|---|
| committer | Adrien Tétar | 2015-09-21 20:55:45 +0200 | 
| commit | b5b2a31716d6ff11b7dcdd237e9e64bcc26327c9 (patch) | |
| tree | 52f9a20aa73de3704c1d7b31b4953c3113c83bb2 /Lib/defconQt/glyphView.py | |
| parent | f83831e31597e8c811f5b3b75cb98a0ff3590a8c (diff) | |
| download | trufont-b5b2a31716d6ff11b7dcdd237e9e64bcc26327c9.tar.bz2 | |
glyphView: knifeTool fixes
Diffstat (limited to 'Lib/defconQt/glyphView.py')
| -rw-r--r-- | Lib/defconQt/glyphView.py | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/defconQt/glyphView.py b/Lib/defconQt/glyphView.py index 04a15cc..c42e4b7 100644 --- a/Lib/defconQt/glyphView.py +++ b/Lib/defconQt/glyphView.py @@ -926,6 +926,8 @@ class GlyphScene(QGraphicsScene):                      onCurve._point.smooth = False          elif currentTool == SceneTools.RulerTool:              self.rulerMouseRelease(event) +        elif currentTool == SceneTools.KnifeTool: +            self.knifeMouseRelease(event)          super(GlyphScene, self).mouseReleaseEvent(event)      def rulerMousePress(self, event): @@ -1089,11 +1091,13 @@ class GlyphScene(QGraphicsScene):              self.removeItem(dot)          self._knifeDots = []          # reverse so as to not invalidate our cached segment indexes +        # XXX: multiple cuts on one segment don't work reliably          self._cachedIntersections.reverse()          if len(self._cachedIntersections):              for intersect in self._cachedIntersections:                  contour, index, t = intersect                  contour.splitAndInsertPointAtSegmentAndT(index, t) +        self._cachedIntersections = []          event.accept()  class GlyphView(QGraphicsView):  | 
