diff options
| author | Adrien Tétar | 2015-11-05 21:55:37 +0100 | 
|---|---|---|
| committer | Adrien Tétar | 2015-11-05 22:00:52 +0100 | 
| commit | 2931c81497ce9840940b2842233ef0b7e2eac8d7 (patch) | |
| tree | c049d2b7e82c9ca3181ceae2c7ee2cf3693764ce /Lib/defconQt/glyphView.py | |
| parent | 33c230f51c6626ea75dc6622c246282caae54cd7 (diff) | |
| download | trufont-2931c81497ce9840940b2842233ef0b7e2eac8d7.tar.bz2 | |
meta: PEP8
Diffstat (limited to 'Lib/defconQt/glyphView.py')
| -rw-r--r-- | Lib/defconQt/glyphView.py | 19 | 
1 files changed, 11 insertions, 8 deletions
| diff --git a/Lib/defconQt/glyphView.py b/Lib/defconQt/glyphView.py index 02f41fc..74af3b3 100644 --- a/Lib/defconQt/glyphView.py +++ b/Lib/defconQt/glyphView.py @@ -219,7 +219,8 @@ class LayerActionsDialog(QDialog):          self.layersList = QListWidget(self)          self.layersList.addItems(              layer.name for layer in self._workableLayers) -        if self.layersList.count(): self.layersList.setCurrentRow(0) +        if self.layersList.count(): +            self.layersList.setCurrentRow(0)          self.layersList.itemDoubleClicked.connect(self.accept)          buttonBox = QDialogButtonBox( @@ -839,7 +840,8 @@ class OnCurvePointItem(QGraphicsPathItem):      def _CPDeleted(self, item):          # XXX: is this sufficient guard? -        if self.isSelected(): return +        if self.isSelected(): +            return          pointIndex = self.getPointIndex()          children = self.childItems()          if item == children[1]: @@ -926,12 +928,14 @@ class OnCurvePointItem(QGraphicsPathItem):              children = self.childItems()              if children[1].isVisible():                  prevPos = children[1].pos() -                self._contour.getPoint(pointIndex - 1).x = self.pos().x() + prevPos.x() -                self._contour.getPoint(pointIndex - 1).y = self.pos().y() + prevPos.y() +                point = self._contour.getPoint(pointIndex - 1) +                point.x = self.pos().x() + prevPos.x() +                point.y = self.pos().y() + prevPos.y()              if children[3].isVisible():                  nextPos = children[3].pos() -                self._contour.getPoint(pointIndex + 1).x = self.pos().x() + nextPos.x() -                self._contour.getPoint(pointIndex + 1).y = self.pos().y() + nextPos.y() +                point = self._contour.getPoint(pointIndex + 1) +                point.x = self.pos().x() + nextPos.x() +                point.y = self.pos().y() + nextPos.y()              self.setShallowDirty()          elif change == QGraphicsItem.ItemSelectedHasChanged:              self._point.selected = value @@ -2394,7 +2398,7 @@ class GlyphView(QGraphicsView):      def layerActions(self):          newLayer, action, ok = LayerActionsDialog.getLayerAndAction( -                                   self, self._glyph) +            self, self._glyph)          if ok and newLayer is not None:              # TODO: whole glyph for now, but consider selection too              if not self._glyph.name in newLayer: @@ -2420,7 +2424,6 @@ class GlyphView(QGraphicsView):                  self._glyph.enableNotifications()              otherGlyph.enableNotifications() -      def _makeLayerGlyph(self, layer):          name = self._name          glyph = layer.newGlyph(name) | 
