mirror of
https://github.com/corda/corda.git
synced 2024-12-19 21:17:58 +00:00
Merge pull request #3010 from corda/pat/explorer-networkview-bugfix
[Bug fix] - explorer doesn't remove node from network view.
This commit is contained in:
commit
99129c1141
@ -26,7 +26,9 @@ class NetworkIdentityModel {
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
list.addAll(update.node)
|
||||
if(update is MapChange.Modified || update is MapChange.Added){
|
||||
list.addAll(update.node)
|
||||
}
|
||||
}
|
||||
|
||||
private val rpcProxy by observableValue(NodeMonitorModel::proxyObservable)
|
||||
|
@ -8,6 +8,7 @@ import javafx.beans.binding.Bindings
|
||||
import javafx.beans.property.SimpleObjectProperty
|
||||
import javafx.beans.value.ObservableValue
|
||||
import javafx.collections.FXCollections
|
||||
import javafx.collections.ListChangeListener
|
||||
import javafx.geometry.Bounds
|
||||
import javafx.geometry.Insets
|
||||
import javafx.geometry.Point2D
|
||||
@ -69,7 +70,15 @@ class Network : CordaView() {
|
||||
private val notaryButtons = notaryComponents.map { it.button }
|
||||
private val peerComponents = peers.map { it.render() }
|
||||
private val peerButtons = peerComponents.filtered { myIdentity.value !in it.nodeInfo.legalIdentitiesAndCerts.map { it.party } }.map { it.button }
|
||||
private val allComponents = FXCollections.observableArrayList(notaryComponents, peerComponents).concatenate()
|
||||
private val allComponents = FXCollections.observableArrayList(notaryComponents, peerComponents).concatenate().apply {
|
||||
addListener(ListChangeListener {
|
||||
if(it.next()){
|
||||
it.removed.forEach {
|
||||
mapPane.children.remove(it.label)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
private val mapLabels = allComponents.map { it.label }
|
||||
|
||||
private data class MapViewComponents(val nodeInfo: NodeInfo, val button: Button, val label: Label)
|
||||
|
Loading…
Reference in New Issue
Block a user