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:
Shadow 2023-09-18 14:11:30 -07:00
parent fbab930c44
commit 7d31628977

View file

@ -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)