From 075da663442b940e1477ea47629a2080d657790d Mon Sep 17 00:00:00 2001 From: Menotdan <32620310+Menotdan@users.noreply.github.com> Date: Tue, 10 Oct 2023 12:46:49 -0400 Subject: [PATCH] I am not a C# compiler. --- Source/Editor/Surface/SurfaceNode.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Editor/Surface/SurfaceNode.cs b/Source/Editor/Surface/SurfaceNode.cs index 4ed6078f7..f2d1a9b1c 100644 --- a/Source/Editor/Surface/SurfaceNode.cs +++ b/Source/Editor/Surface/SurfaceNode.cs @@ -248,12 +248,12 @@ namespace FlaxEditor.Surface } else { - if (control.AnchorPreset == AnchorPresets.TopLeft) + if (child.AnchorPreset == AnchorPresets.TopLeft) { width = Mathf.Max(width, boxSize.X); height = Mathf.Max(height, boxSize.Y); } - else if (!_headerRect.Intersects(control.Bounds)) + else if (!_headerRect.Intersects(child.Bounds)) { width = Mathf.Max(width, boxSize.X); height = Mathf.Max(height, boxSize.Y);