mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-02 20:12:24 +12:00
Resolved critical error that crashes
textColor isn't always set to a value and whenever it was used as an empty variable the program would crash. I'm uncertain as to whether or not this solution is appropriate, but this is one way to handle it and maintain functionality. Another would be setting textColor to a default value, but this default would have to depend on the theme set by the user.
This commit is contained in:
parent
fbab930c44
commit
7d31628977
|
@ -384,7 +384,7 @@ class corkDelegate(QStyledItemDelegate):
|
|||
|
||||
# Draw Summary
|
||||
# One line
|
||||
if lineSummary:
|
||||
if lineSummary and textColor:
|
||||
p.save()
|
||||
f = QFont(option.font)
|
||||
f.setBold(True)
|
||||
|
@ -396,7 +396,7 @@ class corkDelegate(QStyledItemDelegate):
|
|||
p.restore()
|
||||
|
||||
# Full summary
|
||||
if fullSummary:
|
||||
if fullSummary and textColor:
|
||||
p.save()
|
||||
p.setFont(option.font)
|
||||
p.setPen(textColor)
|
||||
|
|
Loading…
Reference in a new issue