Initialize textColor with None

Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
This commit is contained in:
TheJackiMonster 2023-12-07 16:08:44 +01:00
parent 3d4eef2b49
commit a7abc68f8e
No known key found for this signature in database
GPG key ID: D850A5F772E880F9

View file

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