mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04: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
@ -502,7 +502,7 @@ class ManageDictionaries(Dialog): # {{{
|
||||
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…
x
Reference in New Issue
Block a user