mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
Uncommitted stuff
This commit is contained in:
parent
72a80deb27
commit
77b4c034bf
@ -385,6 +385,8 @@ namespace XNodeEditor {
|
||||
list.onRemoveCallback =
|
||||
(ReorderableList rl) => {
|
||||
int index = rl.index;
|
||||
|
||||
if (instancePorts.Count > index) {
|
||||
// Clear the removed ports connections
|
||||
instancePorts[index].ClearConnections();
|
||||
// Move following connections one step up to replace the missing connection
|
||||
@ -399,6 +401,10 @@ namespace XNodeEditor {
|
||||
node.RemoveInstancePort(instancePorts[instancePorts.Count() - 1].fieldName);
|
||||
serializedObject.Update();
|
||||
EditorUtility.SetDirty(node);
|
||||
} else {
|
||||
Debug.LogWarning("InstancePorts[" + index + "] out of range. Length was " + instancePorts.Count + ". Skipping.");
|
||||
}
|
||||
|
||||
if (hasArrayData) {
|
||||
arrayData.DeleteArrayElementAtIndex(index);
|
||||
arraySize--;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user