diff options
| author | Adrien Tétar | 2015-10-14 14:04:15 +0200 |
|---|---|---|
| committer | Adrien Tétar | 2015-10-14 14:04:15 +0200 |
| commit | 80083054465a560825676cf1e6e944f6572c473b (patch) | |
| tree | d930cba056559ad3ce1d048ea29986c51ec08cfd /Lib/defconQt/groupsView.py | |
| parent | b63c182aa1291d01d815cf2b45dfa4f1317f417b (diff) | |
| download | trufont-80083054465a560825676cf1e6e944f6572c473b.tar.bz2 | |
meta: use backspace as Del key on OSX, refactor
Diffstat (limited to 'Lib/defconQt/groupsView.py')
| -rw-r--r-- | Lib/defconQt/groupsView.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/defconQt/groupsView.py b/Lib/defconQt/groupsView.py index 6a15541..9772528 100644 --- a/Lib/defconQt/groupsView.py +++ b/Lib/defconQt/groupsView.py @@ -1,4 +1,5 @@ from defconQt.glyphCollectionView import GlyphCollectionWidget +from defconQt.util import platformSpecific from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * @@ -20,7 +21,7 @@ class GroupListWidget(QListWidget): def keyPressEvent(self, event): key = event.key() - if key == Qt.Key_Delete: + if key == platformSpecific.deleteKey: self.parent()._groupDelete() event.accept() elif key == Qt.Key_Left: @@ -90,7 +91,7 @@ class GroupCollectionWidget(GlyphCollectionWidget): # TODO: The standard QListWidget has scrollbar and does not need three times parent call. # Find out how to handle that properly. def keyPressEvent(self, event): - if event.key() == Qt.Key_Delete: + if event.key() == platformSpecific.deleteKey: if self.characterDeletionCallback is not None: self.characterDeletionCallback(self.selection) event.accept() |
