mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit Book: Spell Check tool: Typing with the word list selected now scrolls the word list to ensure the newly selected word is visible
This commit is contained in:
parent
f07c4a91dc
commit
550a8d209d
@ -830,11 +830,11 @@ class WordsView(QTableView):
|
|||||||
self.copy_to_clipboard()
|
self.copy_to_clipboard()
|
||||||
ev.accept()
|
ev.accept()
|
||||||
return
|
return
|
||||||
|
before = self.currentIndex()
|
||||||
ret = QTableView.keyPressEvent(self, ev)
|
ret = QTableView.keyPressEvent(self, ev)
|
||||||
if ev.key() in (Qt.Key_PageUp, Qt.Key_PageDown, Qt.Key_Up, Qt.Key_Down):
|
after = self.currentIndex()
|
||||||
idx = self.currentIndex()
|
if after.row() != before.row() and after.isValid():
|
||||||
if idx.isValid():
|
self.scrollTo(after)
|
||||||
self.scrollTo(idx)
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def highlight_row(self, row):
|
def highlight_row(self, row):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user