From e650cff42d7dab4100f09047a6b7e0525f0d2981 Mon Sep 17 00:00:00 2001 From: mailchuck Date: Sun, 20 Dec 2015 02:10:38 +0100 Subject: [PATCH] (Un)read messagelist items Previous commits broke them, now it renders correctly again. --- src/bitmessageqt/__init__.py | 4 ++-- src/bitmessageqt/foldertree.py | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index e7f63df8..c24b4554 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -2994,8 +2994,8 @@ class MyForm(settingsmixin.SMainWindow): if not tableWidget.item(currentRow, 0).font().bold(): modified += 1 inventoryHashesToMarkUnread.append(inventoryHashToMarkUnread) - tableWidget.item(currentRow, 0).setFont(font) - tableWidget.item(currentRow, 1).setFont(font) + tableWidget.item(currentRow, 0).setUnread(True) + tableWidget.item(currentRow, 1).setUnread(True) tableWidget.item(currentRow, 2).setFont(font) tableWidget.item(currentRow, 3).setFont(font) #sqlite requires the exact number of ?s to prevent injection diff --git a/src/bitmessageqt/foldertree.py b/src/bitmessageqt/foldertree.py index 7336bd96..6715b183 100644 --- a/src/bitmessageqt/foldertree.py +++ b/src/bitmessageqt/foldertree.py @@ -284,13 +284,9 @@ class MessageList_AddressWidget(QtGui.QTableWidgetItem, AccountMixin, SettingsMi label = unicode(shared.config.get(self.address, 'label'), 'utf-8)') else: self.label = label - if self.initialised: - self.emitDataChanged() def setUnread(self, unread): self.unread = unread - if self.initialised: - self.emitDataChanged() def data(self, role): if role == QtCore.Qt.DisplayRole: