mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
commit
24a6174362
@ -769,11 +769,21 @@ class BooksModel(QAbstractTableModel): # {{{
|
|||||||
bn = self.bool_no_icon
|
bn = self.bool_no_icon
|
||||||
by = self.bool_yes_icon
|
by = self.bool_yes_icon
|
||||||
|
|
||||||
def func(idx):
|
if dt != 'bool':
|
||||||
val = force_to_bool(fffunc(field_obj, idfunc(idx)))
|
def func(idx):
|
||||||
if val is None:
|
val = fffunc(field_obj, idfunc(idx))
|
||||||
return None if bt else bn
|
if val is None:
|
||||||
return by if val else bn
|
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:
|
||||||
|
return None if bt else bn
|
||||||
|
return by if val else bn
|
||||||
elif field == 'size':
|
elif field == 'size':
|
||||||
sz_mult = 1/(1024**2)
|
sz_mult = 1/(1024**2)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user