From bd708b721d7f12e5ed2fd6772c4860dff8d25491 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Sun, 25 Feb 2018 16:42:11 +0200 Subject: [PATCH] Instantiate QFont only when it's needed --- src/bitmessageqt/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index e2c47a0b..3e181dae 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1089,8 +1089,6 @@ class MyForm(settingsmixin.SMainWindow): self, tableWidget, msgfolder, msgid, toAddress, fromAddress, subject, received, read ): - font = QtGui.QFont() - font.setBold(True) if toAddress == str_broadcast_subscribers: acct = accountClass(fromAddress) else: @@ -1116,6 +1114,8 @@ class MyForm(settingsmixin.SMainWindow): time_item.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) if not read: + font = QtGui.QFont() + font.setBold(True) time_item.setFont(font) items.append(time_item) self.addMessageListItem(tableWidget, items)