1
0
mirror of https://github.com/Siccity/xNodeGroups.git synced 2025-12-20 17:26:02 +08:00

Merge pull request #7 from RomanZanevski/patch-2

Connection point fix addition
This commit is contained in:
Thor Brigsted 2022-03-25 08:19:33 +01:00 committed by GitHub
commit b76baaddaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,8 @@ namespace XNodeEditor.NodeGroups {
selection.AddRange(group.GetNodes()); selection.AddRange(group.GetNodes());
// Select Reroutes // Select Reroutes
foreach (Node node in target.graph.nodes) { foreach (Node node in target.graph.nodes) {
if (node != null)
{
foreach (NodePort port in node.Ports) { foreach (NodePort port in node.Ports) {
for (int i = 0; i < port.ConnectionCount; i++) { for (int i = 0; i < port.ConnectionCount; i++) {
List<Vector2> reroutes = port.GetReroutePoints(i); List<Vector2> reroutes = port.GetReroutePoints(i);
@ -63,6 +65,11 @@ namespace XNodeEditor.NodeGroups {
} }
} }
} }
else
{
continue;
}
}
Selection.objects = selection.Distinct().ToArray(); Selection.objects = selection.Distinct().ToArray();
} }
break; break;