mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Fix return key not working in completion popup on OS X
This commit is contained in:
parent
1508b76c68
commit
274d3d4a13
@ -185,11 +185,14 @@ class Completer(QListView): # {{{
|
||||
e.accept()
|
||||
return True
|
||||
if key in (Qt.Key_Enter, Qt.Key_Return):
|
||||
if not self.currentIndex().isValid():
|
||||
self.hide()
|
||||
e.accept()
|
||||
return True
|
||||
return False
|
||||
# We handle this explicitly because on OS X activated() is
|
||||
# not emitted on pressing Enter.
|
||||
idx = self.currentIndex()
|
||||
if idx.isValid():
|
||||
self.item_chosen(idx)
|
||||
self.hide()
|
||||
e.accept()
|
||||
return True
|
||||
if key in (Qt.Key_PageUp, Qt.Key_PageDown):
|
||||
# Let the list view handle these keys
|
||||
return False
|
||||
|
Loading…
x
Reference in New Issue
Block a user