Fix broken outputpop references
This commit is contained in:
parent
ecab0b05c5
commit
805b0f8489
@ -84,8 +84,8 @@ namespace NanoBrain {
|
||||
void OnAddClusterOutput() {
|
||||
Nucleus newOutput = new Neuron(this.prefab, "New Output");
|
||||
this.prefab.RefreshOutputs();
|
||||
outputsPopup.choices = this.prefab.outputs.Select(output => output.name).ToList();
|
||||
outputsPopup.value = newOutput.name;
|
||||
// outputsPopup.choices = this.prefab.outputs.Select(output => output.name).ToList();
|
||||
// outputsPopup.value = newOutput.name;
|
||||
|
||||
this.currentNucleus = newOutput;
|
||||
}
|
||||
@ -185,7 +185,7 @@ namespace NanoBrain {
|
||||
if (newName != this.currentNucleus.name) {
|
||||
this.currentNucleus.name = newName;
|
||||
this.prefab.RefreshOutputs();
|
||||
outputsPopup.choices = this.prefab.outputs.Select(output => output.name).ToList();
|
||||
// outputsPopup.choices = this.prefab.outputs.Select(output => output.name).ToList();
|
||||
anythingChanged = true;
|
||||
}
|
||||
}
|
||||
@ -537,15 +537,16 @@ namespace NanoBrain {
|
||||
}
|
||||
this.prefab.nuclei.Remove(nucleus);
|
||||
|
||||
if (outputsPopup.value == nucleus.name) {
|
||||
this.prefab.RefreshOutputs();
|
||||
outputsPopup.choices = this.prefab.outputs.Select(output => output.name).ToList();
|
||||
outputsPopup.index = 0;
|
||||
}
|
||||
// if (outputsPopup.value == nucleus.name) {
|
||||
// this.prefab.RefreshOutputs();
|
||||
// // outputsPopup.choices = this.prefab.outputs.Select(output => output.name).ToList();
|
||||
// // outputsPopup.index = 0;
|
||||
// }
|
||||
|
||||
Neuron.Delete(nucleus);
|
||||
|
||||
this.currentNucleus = this.prefab.output;
|
||||
this.selectedOutput = this.currentNucleus;
|
||||
}
|
||||
|
||||
Nucleus.Type selectedType = Nucleus.Type.None;
|
||||
|
||||
@ -25,7 +25,7 @@ namespace NanoBrain {
|
||||
protected VisualElement topMenuContainer;
|
||||
protected ScrollView scrollView;
|
||||
protected IMGUIContainer graphContainer;
|
||||
protected readonly PopupField<string> outputsPopup;
|
||||
//protected readonly PopupField<string> outputsPopup;
|
||||
|
||||
public enum Mode {
|
||||
Focus,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user