aboutsummaryrefslogtreecommitdiffstats
path: root/Lib/defconQt/glyphCollectionView.py
diff options
context:
space:
mode:
authorAdrien Tétar2015-10-24 11:59:03 +0200
committerAdrien Tétar2015-10-24 11:59:03 +0200
commitb6d4feaba7c9f3e9b05d1a76187876715538cfce (patch)
tree93f10b8c6a9c28a966f8c5ffd6fad1cfce9a2442 /Lib/defconQt/glyphCollectionView.py
parent6c473c9ebffd4feb90088dbd95ff3c472fce9130 (diff)
downloadtrufont-b6d4feaba7c9f3e9b05d1a76187876715538cfce.tar.bz2
meta: consolidate callbacks/scrolling/sizing
Diffstat (limited to 'Lib/defconQt/glyphCollectionView.py')
-rw-r--r--Lib/defconQt/glyphCollectionView.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/defconQt/glyphCollectionView.py b/Lib/defconQt/glyphCollectionView.py
index 1bbf5d2..9c30c84 100644
--- a/Lib/defconQt/glyphCollectionView.py
+++ b/Lib/defconQt/glyphCollectionView.py
@@ -58,7 +58,7 @@ class GlyphCollectionWidget(QWidget):
self._inputString = ""
self._lastKeyInputTime = None
- self.characterSelectedCallback = None
+ self.glyphSelectedCallback = None
self.doubleClickCallback = None
self.updateCurrentGlyph = False
self._maybeDragPosition = None
@@ -94,7 +94,7 @@ class GlyphCollectionWidget(QWidget):
def _set_selection(self, selection):
self._selection = selection
- self.computeCharacterSelected()
+ self._computeGlyphSelection()
self.update()
selection = property(
@@ -209,15 +209,15 @@ class GlyphCollectionWidget(QWidget):
max(math.ceil(len(self._glyphs) / self._columns) * self.squareSize,
self._scrollArea.height()))
- def computeCharacterSelected(self):
- if self.characterSelectedCallback is None:
+ def _computeGlyphSelection(self):
+ if self.glyphSelectedCallback is None:
return
cnt = len(self.selection)
if cnt == 1:
elem = next(iter(self.selection))
- self.characterSelectedCallback(self._glyphs[elem].name)
+ self.glyphSelectedCallback(self._glyphs[elem].name)
else:
- self.characterSelectedCallback(cnt)
+ self.glyphSelectedCallback(cnt)
def _arrowKeyPressEvent(self, event):
count = event.count()