small fixes

This commit is contained in:
Pascal Serrarens 2026-04-17 17:05:25 +02:00
parent 619ced6505
commit e2e169ca60
2 changed files with 2 additions and 2 deletions

View File

@ -545,7 +545,7 @@ namespace NanoBrain {
if (e.type == EventType.MouseDown && e.button == 0) { if (e.type == EventType.MouseDown && e.button == 0) {
// Consume the event so the scene doesn't also handle it // Consume the event so the scene doesn't also handle it
e.Use(); e.Use();
if (nucleus.parent != null && nucleus.parent is Cluster parentCluster2) if (nucleus is Cluster parentCluster2)
HandleClicked(parentCluster2); HandleClicked(parentCluster2);
else else
HandleClicked(nucleus); HandleClicked(nucleus);

View File

@ -22,7 +22,7 @@ namespace NanoBrain {
get { get {
if (brainInstance == null && brainPrefab != null) { if (brainInstance == null && brainPrefab != null) {
brainInstance = new Cluster(brainPrefab) { brainInstance = new Cluster(brainPrefab) {
name = brainPrefab.name + " (Instance)" name = brainPrefab.name
}; };
} else if (brainInstance != null && brainPrefab == null) { } else if (brainInstance != null && brainPrefab == null) {
brainInstance = null; brainInstance = null;