diff options
| author | Adrien Tétar | 2015-11-06 19:40:50 +0100 |
|---|---|---|
| committer | Adrien Tétar | 2015-11-06 19:40:50 +0100 |
| commit | 0cceeaeda8f10da7a015f000d7673b97622f513d (patch) | |
| tree | 371b1cbefe2934d53b0b600f8465cd68119b3f6a | |
| parent | fd19b960d694dc1f12aaa9b4eaebe2cda6513a14 (diff) | |
| parent | 7168ce02c10032046f736480240ec1cdb8665803 (diff) | |
| download | trufont-0cceeaeda8f10da7a015f000d7673b97622f513d.tar.bz2 | |
Merge pull request #120 from trufont/patch-17
fontView, glyphView: don't copy name
| -rw-r--r-- | Lib/defconQt/fontView.py | 10 | ||||
| -rw-r--r-- | Lib/defconQt/glyphView.py | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/Lib/defconQt/fontView.py b/Lib/defconQt/fontView.py index 393615d..7def24d 100644 --- a/Lib/defconQt/fontView.py +++ b/Lib/defconQt/fontView.py @@ -1012,7 +1012,9 @@ class MainWindow(QMainWindow): glyphs = self.collectionWidget.glyphs pickled = [] for index in sorted(self.collectionWidget.selection): - pickled.append(glyphs[index].serialize()) + pickled.append(glyphs[index].serialize( + blacklist=("name", "unicode") + )) clipboard = QApplication.clipboard() mimeData = QMimeData() mimeData.setData("application/x-defconQt-glyph-data", @@ -1045,13 +1047,7 @@ class MainWindow(QMainWindow): glyphs = self.collectionWidget.getSelectedGlyphs() if len(data) == len(glyphs): for pickled, glyph in zip(data, glyphs): - name = glyph.name - uni = glyph.unicode glyph.deserialize(pickled) - # XXX: after upgrade to ufo3, write a more flexible - # serialization system - glyph.name = name - glyph.unicode = uni def settings(self): if hasattr(self, 'settingsWindow') and self.settingsWindow.isVisible(): diff --git a/Lib/defconQt/glyphView.py b/Lib/defconQt/glyphView.py index 74af3b3..6eb9eee 100644 --- a/Lib/defconQt/glyphView.py +++ b/Lib/defconQt/glyphView.py @@ -1415,7 +1415,9 @@ class GlyphScene(QGraphicsScene): # pass the glyph to a controller object that holds a self._pen copyGlyph.width = self._glyphObject.width mimeData.setData("application/x-defconQt-glyph-data", - pickle.dumps([copyGlyph.serialize()])) + pickle.dumps([copyGlyph.serialize( + blacklist=("name", "unicode") + )])) clipboard.setMimeData(mimeData) event.accept() return |
