Fix #2054935 [[Enhancement] Switch focus to main calibre window when clicking Jump to this book in the library in the Full text search window](https://bugs.launchpad.net/calibre/+bug/2054935)

This commit is contained in:
Kovid Goyal 2024-02-27 13:48:14 +05:30
parent 826e35cb19
commit 09c17cc135
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -46,7 +46,9 @@ def jump_to_book(book_id, parent=None):
gui = get_gui()
if gui is not None:
parent = parent or gui
if not gui.library_view.select_rows((book_id,)):
if gui.library_view.select_rows((book_id,)):
gui.raise_and_focus()
else:
if gprefs['fts_library_restrict_books']:
error_dialog(parent, _('Not found'), _('This book was not found in the calibre library'), show=True)
else: