Spell check: Fix replacing a word and then replacing the new word again not working without doing a refresh in between

This commit is contained in:
Kovid Goyal 2014-04-20 11:23:31 +05:30
parent 1d4a0cd24b
commit 7af2683b7d

View File

@ -701,6 +701,8 @@ class WordsModel(QAbstractTableModel):
self.update_word(w) self.update_word(w)
def replace_word(self, w, new_word): def replace_word(self, w, new_word):
for location in self.words[w]:
location.original_word = new_word
if w[0] == new_word: if w[0] == new_word:
return w return w
new_key = (new_word, w[1]) new_key = (new_word, w[1])