mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit Book: Spell Check dialog: Always add the original word as one of the spelling corrections, so that small edits to the word can be made easily. Fixes #1667914 [Suggesting always the assumed misspelled word in the spellchecker](https://bugs.launchpad.net/calibre/+bug/1667914)
This commit is contained in:
parent
333ab06fbd
commit
0d01bf5573
@ -8,6 +8,7 @@ __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
|||||||
|
|
||||||
import cPickle, os, sys
|
import cPickle, os, sys
|
||||||
from collections import defaultdict, OrderedDict
|
from collections import defaultdict, OrderedDict
|
||||||
|
from itertools import chain
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
@ -1093,7 +1094,7 @@ class SpellCheck(Dialog):
|
|||||||
suggestions = dictionaries.suggestions(*w)
|
suggestions = dictionaries.suggestions(*w)
|
||||||
self.suggested_list.clear()
|
self.suggested_list.clear()
|
||||||
word_suggested = False
|
word_suggested = False
|
||||||
for i, s in enumerate(suggestions):
|
for i, s in enumerate(chain(suggestions, (current_word,))):
|
||||||
item = QListWidgetItem(s, self.suggested_list)
|
item = QListWidgetItem(s, self.suggested_list)
|
||||||
if i == 0:
|
if i == 0:
|
||||||
self.suggested_list.setCurrentItem(item)
|
self.suggested_list.setCurrentItem(item)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user