Edit Book: Spell check dialog: Ensure that the new current word is highlighted after changing a word.

This commit is contained in:
Kovid Goyal 2016-11-08 11:14:09 +05:30
parent 550a8d209d
commit f9931d792a

View File

@ -1137,6 +1137,8 @@ class SpellCheck(Dialog):
self.word_replaced.emit(changed_files) self.word_replaced.emit(changed_files)
w = self.words_model.replace_word(w, new_word) w = self.words_model.replace_word(w, new_word)
row = self.words_model.row_for_word(w) row = self.words_model.row_for_word(w)
if row == -1:
row = self.words_view.currentIndex().row()
if row > -1: if row > -1:
self.words_view.highlight_row(row) self.words_view.highlight_row(row)