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

Connection point fix

If you use additional connection points in your graph you will see the NullRefExeption and your group will not be able to capture nodes inside, because of connection point(it's the same node with null type). This small fix add ability to capture graphs with connection points.
This commit is contained in:
RomanZanevski 2022-03-21 14:02:48 +01:00 committed by GitHub
parent 4f4585bd6a
commit 35c3f55b03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,6 +19,7 @@ namespace XNode.NodeGroups {
List<Node> result = new List<Node>();
foreach (Node node in graph.nodes) {
if (node == this) continue;
if (node == null) continue;
if (node.position.x < this.position.x) continue;
if (node.position.y < this.position.y) continue;
if (node.position.x > this.position.x + width) continue;
@ -28,4 +29,4 @@ namespace XNode.NodeGroups {
return result;
}
}
}
}