Browse Source

network dialog: show only populated chains

2.9.x
ThomasV 8 years ago
parent
commit
05a9718b7c
  1. 5
      gui/qt/network_dialog.py

5
gui/qt/network_dialog.py

@ -98,12 +98,13 @@ class NodesListWidget(QTreeWidget):
n_chains = len(network.blockchains)
if n_chains > 1:
for b in network.blockchains.values():
items = filter(lambda i: i.blockchain==b, network.interfaces.values())
if items:
name = network.get_blockchain_name(b)
x = QTreeWidgetItem([name + '@%d'%checkpoint, '%d'%b.height()])
x.setData(0, Qt.UserRole, 1)
x.setData(1, Qt.UserRole, b.checkpoint)
for i in network.interfaces.values():
if i.blockchain == b:
for i in items:
star = ' *' if i == network.interface else ''
item = QTreeWidgetItem([i.host + star, '%d'%i.tip])
item.setData(0, Qt.UserRole, 0)

Loading…
Cancel
Save