Fixes #1922300 [Tag browser: Blank search doesn't clear filters](https://bugs.launchpad.net/calibre/+bug/1922300)
This commit is contained in:
Kovid Goyal 2021-04-03 20:53:23 +05:30
commit 653c8c17de
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -826,7 +826,7 @@ class TagBrowserWidget(QFrame): # {{{
self.not_found_label.setVisible(False)
def keyPressEvent(self, ev):
if ev.key() in (Qt.Key.Key_Enter, Qt.Key.Key_Return) and self.find_text:
if ev.key() in (Qt.Key.Key_Enter, Qt.Key.Key_Return) and self.item_search.hasFocus():
self.find()
ev.accept()
return