mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/shouya/calibre
This commit is contained in:
commit
48ec47dc15
@ -336,14 +336,15 @@ class Highlights(QTreeWidget):
|
||||
|
||||
for h in self.sorted_highlights(highlights):
|
||||
tfam = tuple(h.get('toc_family_titles') or ())
|
||||
spine_index = h.get('spine_index', -1)
|
||||
if tfam:
|
||||
tsec = tfam[0]
|
||||
lsec = tfam[-1]
|
||||
key = tfam
|
||||
key = (spine_index,) + tfam
|
||||
else:
|
||||
tsec = h.get('top_level_section_title')
|
||||
lsec = h.get('lowest_level_section_title')
|
||||
key = (tsec or '', lsec or '')
|
||||
key = (spine_index, tsec or '', lsec or '')
|
||||
short_title = lsec or tsec or _('Unknown')
|
||||
section = {
|
||||
'title': short_title, 'tfam': tfam, 'tsec': tsec, 'lsec': lsec, 'items': [], 'tooltip': tooltip_for(tfam), 'key': key,
|
||||
|
Loading…
x
Reference in New Issue
Block a user