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

Fixes #1900099 [Show checkmarks on text with fixed values: Red Xs on everything](https://bugs.launchpad.net/calibre/+bug/1900099)
This commit is contained in:
Kovid Goyal 2020-10-16 18:18:57 +05:30
commit 24a6174362
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -769,6 +769,16 @@ class BooksModel(QAbstractTableModel): # {{{
bn = self.bool_no_icon
by = self.bool_yes_icon
if dt != 'bool':
def func(idx):
val = fffunc(field_obj, idfunc(idx))
if val is None:
return None
val = force_to_bool(val)
if val is None:
return None
return by if val else bn
else:
def func(idx):
val = force_to_bool(fffunc(field_obj, idfunc(idx)))
if val is None: