mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 01:06:01 +08:00
Merge pull request #341 from RomanZanevski/patch-1
Fix OnRemoveConnection from calling side
This commit is contained in:
commit
4e15a2110e
@ -296,12 +296,13 @@ namespace XNode {
|
|||||||
for (int i = 0; i < port.connections.Count; i++) {
|
for (int i = 0; i < port.connections.Count; i++) {
|
||||||
if (port.connections[i].Port == this) {
|
if (port.connections[i].Port == this) {
|
||||||
port.connections.RemoveAt(i);
|
port.connections.RemoveAt(i);
|
||||||
|
// Trigger OnRemoveConnection from this side port
|
||||||
|
port.node.OnRemoveConnection(port);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Trigger OnRemoveConnection
|
// Trigger OnRemoveConnection
|
||||||
node.OnRemoveConnection(this);
|
node.OnRemoveConnection(this);
|
||||||
if (port != null && port.IsConnectedTo(this)) port.node.OnRemoveConnection(port);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> Disconnect this port from another port </summary>
|
/// <summary> Disconnect this port from another port </summary>
|
||||||
@ -413,4 +414,4 @@ namespace XNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user