diff options
| author | Adrien Tétar | 2015-11-06 19:30:46 +0100 |
|---|---|---|
| committer | Adrien Tétar | 2015-11-06 19:37:21 +0100 |
| commit | 7168ce02c10032046f736480240ec1cdb8665803 (patch) | |
| tree | 13175081531ef3cca1325946a614df4885ad0539 | |
| parent | 9551e20b7c92c79906815a66b99757c322db518b (diff) | |
| download | trufont-7168ce02c10032046f736480240ec1cdb8665803.tar.bz2 | |
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 bef5263..f7150c3 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 da933c2..c2aeafe 100644 --- a/Lib/defconQt/glyphView.py +++ b/Lib/defconQt/glyphView.py @@ -1333,7 +1333,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 |
