FTS: Only use calibre internal viewer for configured fmts

This commit is contained in:
Kovid Goyal 2022-06-26 14:06:21 +05:30
parent d38bcc7ad0
commit 63563fe0c3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -785,7 +785,10 @@ class ResultsPanel(QWidget):
text = sanitize_text_pat.sub(' ', text)
gui = get_gui()
if gui is not None:
if fmt in config['internally_viewed_formats']:
gui.iactions['View'].view_format_by_id(book_id, fmt, open_at=f'search:{text}')
else:
gui.iactions['View'].view_format_by_id(book_id, fmt)
def request_stop_search(self):
if question_dialog(self, _('Are you sure?'), _('Abort the current search?')):