From 72299483c415d0901db5b59c64c891e340d527a7 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Fri, 2 Mar 2018 14:56:25 +0200 Subject: [PATCH] Do not duplicate avatar in address column of Address book --- src/bitmessageqt/foldertree.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/bitmessageqt/foldertree.py b/src/bitmessageqt/foldertree.py index 11227fca..22412a92 100644 --- a/src/bitmessageqt/foldertree.py +++ b/src/bitmessageqt/foldertree.py @@ -491,7 +491,15 @@ class Ui_AddressBookWidgetItemAddress(Ui_AddressBookWidgetItem): Ui_AddressBookWidgetItem.__init__(self, address, type) self.address = address self.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - + + def data(self, role): + if role == QtCore.Qt.ToolTipRole: + return self.address + if role == QtCore.Qt.DecorationRole: + return + return super(Ui_AddressBookWidgetItemAddress, self).data(role) + + class AddressBookCompleter(QtGui.QCompleter): def __init__(self): super(QtGui.QCompleter, self).__init__()