From a7abc68f8e61416072d57fb1e27b24d3267d4cce Mon Sep 17 00:00:00 2001 From: TheJackiMonster Date: Thu, 7 Dec 2023 16:08:44 +0100 Subject: [PATCH] Initialize textColor with None Signed-off-by: TheJackiMonster --- manuskript/ui/views/corkDelegate.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/manuskript/ui/views/corkDelegate.py b/manuskript/ui/views/corkDelegate.py index e6c7aa5..387bfcb 100644 --- a/manuskript/ui/views/corkDelegate.py +++ b/manuskript/ui/views/corkDelegate.py @@ -320,6 +320,7 @@ class corkDelegate(QStyledItemDelegate): # Draw title p.save() text = index.data() + textColor = None if text: p.setPen(Qt.black) @@ -384,11 +385,6 @@ class corkDelegate(QStyledItemDelegate): # Draw Summary # One line - #checking that textColor is actually defined before we use it - try: - textColor - except: - textColor = None if lineSummary and textColor: p.save() f = QFont(option.font)