mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Improve robustness in column coloring.
This commit is contained in:
parent
29b453ba23
commit
de969af505
@ -715,7 +715,8 @@ class BooksModel(QAbstractTableModel): # {{{
|
|||||||
fmt = self.column_color_map[key]
|
fmt = self.column_color_map[key]
|
||||||
try:
|
try:
|
||||||
color = composite_formatter.safe_format(fmt, mi, '', mi)
|
color = composite_formatter.safe_format(fmt, mi, '', mi)
|
||||||
return QColor(color)
|
if QColor.isValid(color):
|
||||||
|
return QColor(color)
|
||||||
except:
|
except:
|
||||||
return None
|
return None
|
||||||
elif self.is_custom_column(key) and \
|
elif self.is_custom_column(key) and \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user