Merge pull request #361 from corebob/master

Fixed a problem with sticky bold fonts
This commit is contained in:
Jonathan Warren 2013-08-02 08:13:09 -07:00
commit b5e8686c7d

View File

@ -2820,6 +2820,11 @@ class MyForm(QtGui.QMainWindow):
def tableWidgetInboxItemClicked(self): def tableWidgetInboxItemClicked(self):
currentRow = self.ui.tableWidgetInbox.currentRow() currentRow = self.ui.tableWidgetInbox.currentRow()
if currentRow >= 0: if currentRow >= 0:
font = QFont()
font.setBold(False)
self.ui.textEditInboxMessage.setCurrentFont(font)
fromAddress = str(self.ui.tableWidgetInbox.item( fromAddress = str(self.ui.tableWidgetInbox.item(
currentRow, 1).data(Qt.UserRole).toPyObject()) currentRow, 1).data(Qt.UserRole).toPyObject())
# If we have received this message from either a broadcast address # If we have received this message from either a broadcast address
@ -2839,8 +2844,6 @@ class MyForm(QtGui.QMainWindow):
self.ui.textEditInboxMessage.setPlainText(self.ui.tableWidgetInbox.item(currentRow, 2).data(Qt.UserRole).toPyObject()[ self.ui.textEditInboxMessage.setPlainText(self.ui.tableWidgetInbox.item(currentRow, 2).data(Qt.UserRole).toPyObject()[
:30000] + '\n\nDisplay of the remainder of the message truncated because it is too long.') # Only show the first 30K characters :30000] + '\n\nDisplay of the remainder of the message truncated because it is too long.') # Only show the first 30K characters
font = QFont()
font.setBold(False)
self.ui.tableWidgetInbox.item(currentRow, 0).setFont(font) self.ui.tableWidgetInbox.item(currentRow, 0).setFont(font)
self.ui.tableWidgetInbox.item(currentRow, 1).setFont(font) self.ui.tableWidgetInbox.item(currentRow, 1).setFont(font)
self.ui.tableWidgetInbox.item(currentRow, 2).setFont(font) self.ui.tableWidgetInbox.item(currentRow, 2).setFont(font)