diff options
| author | Adrien Tétar | 2015-10-31 16:41:17 +0100 |
|---|---|---|
| committer | Adrien Tétar | 2015-10-31 16:41:17 +0100 |
| commit | 6135470d0ada8686ace9d44ace4e103fe2fd5234 (patch) | |
| tree | aaca30f1c2d51e12a99e6fe480a5ef6cac612f05 /Lib/defconQt/glyphView.py | |
| parent | 8ee74e400b2f8c41f7c16918c340a4561e98d8bd (diff) | |
| download | trufont-6135470d0ada8686ace9d44ace4e103fe2fd5234.tar.bz2 | |
defcon: newGlyph returns the glyph, glyphView: preserve currentTool
Diffstat (limited to 'Lib/defconQt/glyphView.py')
| -rw-r--r-- | Lib/defconQt/glyphView.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/defconQt/glyphView.py b/Lib/defconQt/glyphView.py index 45ba255..fb39e1c 100644 --- a/Lib/defconQt/glyphView.py +++ b/Lib/defconQt/glyphView.py @@ -367,7 +367,7 @@ class MainGfxWindow(QMainWindow): oldView = self.view # Preserve the selected layer (by setting the glyph from that layer) # Todo: If that layer is already in the glyph, it would be a little bit - # harder to create it here and may be better or worse. Worse becaue + # harder to create it here and may be better or worse. Worse because # we'd alter the data without being explicitly asked to do so. # Ask someone who does UX. if oldView: @@ -383,6 +383,7 @@ class MainGfxWindow(QMainWindow): # GlyphView? If yes, we should make an interface for a # predecessor -> successor transformation if oldView: + self.view._currentTool = oldView._currentTool self.view.setTransform(oldView.transform()) self._setlayerColorButtonColor() @@ -2310,8 +2311,7 @@ class GlyphView(QGraphicsView): def _makeLayerGlyph(self, layer): name = self._name - layer.newGlyph(name) - glyph = layer[name] + glyph = layer.newGlyph(name) # TODO: generalize this out, can’t use newStandardGlyph unfortunately glyph.width = self.defaultWidth |
