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 =
|
list.onRemoveCallback =
|
||||||
(ReorderableList rl) => {
|
(ReorderableList rl) => {
|
||||||
int index = rl.index;
|
int index = rl.index;
|
||||||
|
|
||||||
|
if (instancePorts.Count > index) {
|
||||||
// Clear the removed ports connections
|
// Clear the removed ports connections
|
||||||
instancePorts[index].ClearConnections();
|
instancePorts[index].ClearConnections();
|
||||||
// Move following connections one step up to replace the missing connection
|
// Move following connections one step up to replace the missing connection
|
||||||
@ -399,6 +401,10 @@ namespace XNodeEditor {
|
|||||||
node.RemoveInstancePort(instancePorts[instancePorts.Count() - 1].fieldName);
|
node.RemoveInstancePort(instancePorts[instancePorts.Count() - 1].fieldName);
|
||||||
serializedObject.Update();
|
serializedObject.Update();
|
||||||
EditorUtility.SetDirty(node);
|
EditorUtility.SetDirty(node);
|
||||||
|
} else {
|
||||||
|
Debug.LogWarning("InstancePorts[" + index + "] out of range. Length was " + instancePorts.Count + ". Skipping.");
|
||||||
|
}
|
||||||
|
|
||||||
if (hasArrayData) {
|
if (hasArrayData) {
|
||||||
arrayData.DeleteArrayElementAtIndex(index);
|
arrayData.DeleteArrayElementAtIndex(index);
|
||||||
arraySize--;
|
arraySize--;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user