Browse Source

qt network dialog: fix NodesListWidget if there is fork

undo part of 5473320ce4
3.3.3.1
SomberNight 6 years ago
parent
commit
5b9b6a931d
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 3
      electrum/gui/qt/network_dialog.py

3
electrum/gui/qt/network_dialog.py

@ -100,6 +100,7 @@ class NodesListWidget(QTreeWidget):
def update(self, network: Network):
self.clear()
self.addChild = self.addTopLevelItem
chains = network.get_blockchains()
n_chains = len(chains)
for chain_id, interfaces in chains.items():
@ -117,7 +118,7 @@ class NodesListWidget(QTreeWidget):
item = QTreeWidgetItem([i.host + star, '%d'%i.tip])
item.setData(0, Qt.UserRole, 0)
item.setData(1, Qt.UserRole, i.server)
x.addTopLevelItem(item)
x.addChild(item)
if n_chains > 1:
self.addTopLevelItem(x)
x.setExpanded(True)

Loading…
Cancel
Save