(Un)read messagelist items

Previous commits broke them, now it renders correctly again.
This commit is contained in:
mailchuck 2015-12-20 02:10:38 +01:00
parent 1c084a80b5
commit 469c822409
Signed by untrusted user who does not match committer: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
2 changed files with 2 additions and 6 deletions

View File

@ -2995,8 +2995,8 @@ class MyForm(settingsmixin.SMainWindow):
if not tableWidget.item(currentRow, 0).font().bold(): if not tableWidget.item(currentRow, 0).font().bold():
modified += 1 modified += 1
inventoryHashesToMarkUnread.append(inventoryHashToMarkUnread) inventoryHashesToMarkUnread.append(inventoryHashToMarkUnread)
tableWidget.item(currentRow, 0).setFont(font) tableWidget.item(currentRow, 0).setUnread(True)
tableWidget.item(currentRow, 1).setFont(font) tableWidget.item(currentRow, 1).setUnread(True)
tableWidget.item(currentRow, 2).setFont(font) tableWidget.item(currentRow, 2).setFont(font)
tableWidget.item(currentRow, 3).setFont(font) tableWidget.item(currentRow, 3).setFont(font)
#sqlite requires the exact number of ?s to prevent injection #sqlite requires the exact number of ?s to prevent injection

View File

@ -284,13 +284,9 @@ class MessageList_AddressWidget(QtGui.QTableWidgetItem, AccountMixin, SettingsMi
label = unicode(shared.config.get(self.address, 'label'), 'utf-8)') label = unicode(shared.config.get(self.address, 'label'), 'utf-8)')
else: else:
self.label = label self.label = label
if self.initialised:
self.emitDataChanged()
def setUnread(self, unread): def setUnread(self, unread):
self.unread = unread self.unread = unread
if self.initialised:
self.emitDataChanged()
def data(self, role): def data(self, role):
if role == QtCore.Qt.DisplayRole: if role == QtCore.Qt.DisplayRole: