Fix keyboard focus not going to cover grid after doing a search. Fixes #1369160 [post entering a search focus is on an element of the search result in default mode but on the search box in cover grid mode](https://bugs.launchpad.net/calibre/+bug/1369160)

This commit is contained in:
Kovid Goyal 2014-09-14 10:10:23 +05:30
parent 4d2a5796f8
commit 3004603cd4

View File

@ -948,6 +948,7 @@ class GridView(QListView):
def restore_current_book_state(self, state):
book_id = state
self.setFocus(Qt.OtherFocusReason)
try:
row = self.model().db.data.id_to_index(book_id)
except (IndexError, ValueError, KeyError, TypeError, AttributeError):