mirror of
https://github.com/corda/corda.git
synced 2025-01-25 21:59:22 +00:00
[Bug fix] - explorer doesn't remove node from network view. (#779)
This commit is contained in:
parent
d2b6978d90
commit
eb5b03e2f5
@ -36,7 +36,9 @@ class NetworkIdentityModel {
|
|||||||
else -> false
|
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)
|
private val rpcProxy by observableValue(NodeMonitorModel::proxyObservable)
|
||||||
|
@ -18,6 +18,7 @@ import javafx.beans.binding.Bindings
|
|||||||
import javafx.beans.property.SimpleObjectProperty
|
import javafx.beans.property.SimpleObjectProperty
|
||||||
import javafx.beans.value.ObservableValue
|
import javafx.beans.value.ObservableValue
|
||||||
import javafx.collections.FXCollections
|
import javafx.collections.FXCollections
|
||||||
|
import javafx.collections.ListChangeListener
|
||||||
import javafx.geometry.Bounds
|
import javafx.geometry.Bounds
|
||||||
import javafx.geometry.Insets
|
import javafx.geometry.Insets
|
||||||
import javafx.geometry.Point2D
|
import javafx.geometry.Point2D
|
||||||
@ -79,7 +80,15 @@ class Network : CordaView() {
|
|||||||
private val notaryButtons = notaryComponents.map { it.button }
|
private val notaryButtons = notaryComponents.map { it.button }
|
||||||
private val peerComponents = peers.map { it.render() }
|
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 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 val mapLabels = allComponents.map { it.label }
|
||||||
|
|
||||||
private data class MapViewComponents(val nodeInfo: NodeInfo, val button: Button, val label: Label)
|
private data class MapViewComponents(val nodeInfo: NodeInfo, val button: Button, val label: Label)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user