Fix regression causing failure when second line template is None

This commit is contained in:
Kovid Goyal 2026-01-16 19:17:29 +05:30
parent ee4d8d7127
commit 25e034a8c4
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1059,9 +1059,9 @@ class BookCase(QObject):
if mdb is None or invalidate.is_set():
return
db = mdb.new_api
spine_size_template = db.pref('bookshelf_spine_size_template', get_default_from_defaults=True)
spine_size_template = db.pref('bookshelf_spine_size_template', get_default_from_defaults=True) or ''
if gprefs['bookshelf_make_space_for_second_line']:
author_template = db.pref('bookshelf_author_template', get_default_from_defaults=True)
author_template = db.pref('bookshelf_author_template', get_default_from_defaults=True) or ''
if author_template.strip():
min_line_height *= 2
template_cache = {}