From 6dcb0661509df337cc1e5da6067e4c9a2376b923 Mon Sep 17 00:00:00 2001 From: Adrien Tétar Date: Sat, 31 Oct 2015 22:36:03 +0100 Subject: glyphCollectionView: tiny improvements to the selection system --- Lib/defconQt/fontView.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Lib/defconQt/fontView.py') diff --git a/Lib/defconQt/fontView.py b/Lib/defconQt/fontView.py index 198e8d9..5eebd8d 100644 --- a/Lib/defconQt/fontView.py +++ b/Lib/defconQt/fontView.py @@ -91,6 +91,8 @@ class Application(QApplication): return self._currentGlyph = glyph self.currentGlyphChanged.emit() + if self._currentGlyph is None: + return # update currentMainWindow if we need to. # XXX: find a way to update currentMainWindow when we switch to any # child of a MainWindow instead of the MainWindow itself. @@ -1054,7 +1056,7 @@ class MainWindow(QMainWindow): if glyph not in glyphs: glyphs.append(glyph) else: - glyphs = self._font[:] + glyphs = list(self._font) self.collectionWidget.glyphs = glyphs def _glyphOpened(self, glyph): -- cgit v1.2.3