Make custom columns using bool icons put text values under the icons.

This commit is contained in:
Charles Haley 2013-01-24 13:53:13 +01:00
parent 9f220fb79b
commit 1005fce494

View File

@ -634,13 +634,12 @@ class BooksModel(QAbstractTableModel): # {{{
def bool_type_decorator(r, idx=-1, bool_cols_are_tristate=True):
val = force_to_bool(self.db.data[r][idx])
if val is None:
if not bool_cols_are_tristate:
if val is None or not val:
return self.bool_no_icon
return None
if val:
return self.bool_yes_icon
if val is None:
return self.bool_blank_icon
return self.bool_no_icon
def ondevice_decorator(r, idx=-1):