mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
E-book viewer: Fix clicking on ToC entries moving keyboard focus to the ToC search box when the ToC window is floating
This commit is contained in:
parent
f7b592023f
commit
5d4fcb02df
@ -362,6 +362,11 @@ class EbookViewer(MainWindow):
|
||||
def toc_clicked(self, index):
|
||||
item = self.toc_model.itemFromIndex(index)
|
||||
self.web_view.goto_toc_node(item.node_id)
|
||||
self.force_focus_on_web_view()
|
||||
|
||||
def force_focus_on_web_view(self):
|
||||
self.activateWindow()
|
||||
self.web_view.setFocus(Qt.FocusReason.OtherFocusReason)
|
||||
|
||||
def toc_searched(self, index):
|
||||
item = self.toc_model.itemFromIndex(index)
|
||||
|
Loading…
x
Reference in New Issue
Block a user