Merge branch 'master' of https://github.com/cbhaley/calibre into master

This commit is contained in:
Kovid Goyal 2020-09-09 15:52:11 +05:30
commit 6fcd0e7407
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -529,10 +529,9 @@ class TagsModel(QAbstractItemModel): # {{{
last_ordnum = 0 last_ordnum = 0
last_c = ' ' last_c = ' '
for idx,tag in enumerate(data[key]): for idx,tag in enumerate(data[key]):
if not tag.sort: # Deal with items that don't have sorts, such as formats
c = ' ' t = tag.sort if tag.sort else tag.name
else: c = icu_upper(t) if t else ' '
c = icu_upper(tag.sort)
ordnum, ordlen = collation_order(c) ordnum, ordlen = collation_order(c)
if last_ordnum != ordnum: if last_ordnum != ordnum:
last_c = c[0:ordlen] last_c = c[0:ordlen]