From 7af2683b7d97625c07a282f0ff8185fff186f173 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 20 Apr 2014 11:23:31 +0530 Subject: [PATCH] Spell check: Fix replacing a word and then replacing the new word again not working without doing a refresh in between --- src/calibre/gui2/tweak_book/spell.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/tweak_book/spell.py b/src/calibre/gui2/tweak_book/spell.py index 06a277e996..153236185b 100644 --- a/src/calibre/gui2/tweak_book/spell.py +++ b/src/calibre/gui2/tweak_book/spell.py @@ -701,6 +701,8 @@ class WordsModel(QAbstractTableModel): self.update_word(w) def replace_word(self, w, new_word): + for location in self.words[w]: + location.original_word = new_word if w[0] == new_word: return w new_key = (new_word, w[1])