From 25e3f171f978e1296b958e9b770959f31b7c8c4f Mon Sep 17 00:00:00 2001 From: Emre Dogan <48212096+EmreDogann@users.noreply.github.com> Date: Sun, 8 Oct 2023 23:29:56 +0100 Subject: [PATCH] Re-enabled selecting of group children nodes. --- Scripts/Editor/NodeGroupEditor.cs | 4 ++-- Scripts/NodeGroup.cs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Scripts/Editor/NodeGroupEditor.cs b/Scripts/Editor/NodeGroupEditor.cs index fcaacf0..b7f4bc0 100644 --- a/Scripts/Editor/NodeGroupEditor.cs +++ b/Scripts/Editor/NodeGroupEditor.cs @@ -123,7 +123,7 @@ namespace XNodeEditor.NodeGroups case EventType.MouseUp: _isResizing = false; // Select nodes inside the group - if (false && Selection.Contains(target)) + if (Selection.Contains(target)) { var selection = Selection.objects.ToList(); // Select Nodes @@ -156,7 +156,7 @@ namespace XNodeEditor.NodeGroups continue; } - if (p.y > group.position.y + group.height + 30) + if (p.y > group.position.y + group.height + headerStyle.fixedHeight) { continue; } diff --git a/Scripts/NodeGroup.cs b/Scripts/NodeGroup.cs index 4cf7929..20c1e9f 100644 --- a/Scripts/NodeGroup.cs +++ b/Scripts/NodeGroup.cs @@ -46,7 +46,8 @@ namespace XNode continue; } - if (node.position.y > position.y + height + 30) + // Number at the end must match the fixedHeight for the group's header style. + if (node.position.y > position.y + height + 46) { continue; }