From 7d3162897737a4c0010a465f704362d35b15d383 Mon Sep 17 00:00:00 2001 From: Shadow Date: Mon, 18 Sep 2023 14:11:30 -0700 Subject: [PATCH] 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. --- manuskript/ui/views/corkDelegate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manuskript/ui/views/corkDelegate.py b/manuskript/ui/views/corkDelegate.py index fc63c28..99850e7 100644 --- a/manuskript/ui/views/corkDelegate.py +++ b/manuskript/ui/views/corkDelegate.py @@ -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)