mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-21 17:45:57 +01:00
Edit book: Fix regression in calibre 5 that caused an error when managing user dictionaries. Fixes #1903294 [Preferences / Editor settings / Manage spelling dictionaries throws exception](https://bugs.launchpad.net/calibre/+bug/1903294)
This commit is contained in:
parent
7c91fc2bb7
commit
238ff455f7
1 changed files with 1 additions and 1 deletions
|
|
@ -502,7 +502,7 @@ def build_dictionaries(self, reread=False):
|
|||
if countrycode == best_country:
|
||||
j.setData(0, Qt.FontRole, bf)
|
||||
pd = get_dictionary(DictionaryLocale(lc, countrycode))
|
||||
for dictionary in sorted(languages[lc][countrycode], key=lambda d:d.name):
|
||||
for dictionary in sorted(languages[lc][countrycode], key=lambda d:(d.name or '')):
|
||||
k = QTreeWidgetItem(j, DICTIONARY)
|
||||
pl = calibre_langcode_to_name(dictionary.primary_locale.langcode)
|
||||
if dictionary.primary_locale.countrycode:
|
||||
|
|
|
|||
Loading…
Reference in a new issue