diff --git a/src/cutecoin/models/network.py b/src/cutecoin/models/network.py index 50ee9b39a6238d57076a01d4a1ef2a7091f3c805..a3325a706efbb8fe4bfedb9bad56031b165cc6a4 100644 --- a/src/cutecoin/models/network.py +++ b/src/cutecoin/models/network.py @@ -54,11 +54,15 @@ class NetworkFilterProxyModel(QSortFilterProxyModel): if not source_index.isValid(): return QVariant() source_data = source_model.data(source_index, role) - if index.column() == self.sourceModel().columns_types.index('is_member') \ + if index.column() == source_model.columns_types.index('is_member') \ and role == Qt.DisplayRole: value = {True: 'yes', False: 'no', None: 'offline'} return value[source_data] + if index.column() == source_model.columns_types.index('pubkey') \ + and role == Qt.DisplayRole: + return source_data[:5] + if role == Qt.TextAlignmentRole: if source_index.column() == source_model.columns_types.index('address') or source_index.column() == self.sourceModel().columns_types.index('current_block'): return Qt.AlignRight | Qt.AlignVCenter