Better cross-cluster monitoring

This commit is contained in:
Pascal Serrarens 2026-04-23 11:55:17 +02:00
parent 4f8a6abbe9
commit e4ba7f8497

View File

@ -727,15 +727,8 @@ namespace NanoBrain {
protected void OnNeuronClick(Nucleus nucleus) { protected void OnNeuronClick(Nucleus nucleus) {
if (nucleus == this.currentNucleus) { if (nucleus == this.currentNucleus) {
if (Application.isPlaying) { if (Application.isPlaying) {
if (nucleus is Cluster cluster) { if (nucleus is Cluster)
if (expandArray) { expandArray = !expandArray;
this.currentNucleus = cluster.defaultOutput;
if (this.currentNucleus is Neuron neuron && neuron.receivers.Count == 0)
this.selectedOutput = this.currentNucleus; expandArray = false;
}
else
expandArray = !expandArray;
}
else else
expandArray = false; expandArray = false;
} }
@ -746,9 +739,17 @@ namespace NanoBrain {
} }
else if (nucleus.parent != null && this.currentNucleus != null && nucleus.parent != this.currentNucleus.parent) { else if (nucleus.parent != null && this.currentNucleus != null && nucleus.parent != this.currentNucleus.parent) {
// We go to a different cluster // We go to a different cluster
// select the cluster, not the neuron in the cluster if (Application.isPlaying) {
this.currentNucleus = nucleus.parent; this.currentNucleus = nucleus;
expandArray = false; if (this.currentNucleus is Neuron neuron && neuron.receivers.Count == 0)
this.selectedOutput = this.currentNucleus;
expandArray = false;
}
else {
// select the cluster, not the neuron in the cluster
this.currentNucleus = nucleus.parent;
expandArray = false;
}
} }
else { else {
this.currentNucleus = nucleus; this.currentNucleus = nucleus;