From 119426e442b85b7e0ee8b2c9464fc70eae06a896 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Wed, 21 Feb 2024 00:28:08 -0700 Subject: [PATCH] Don't copy this --- Terminal.Gui/View/Layout/ViewLayout.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Terminal.Gui/View/Layout/ViewLayout.cs b/Terminal.Gui/View/Layout/ViewLayout.cs index 3786a86eb..e58846f0f 100644 --- a/Terminal.Gui/View/Layout/ViewLayout.cs +++ b/Terminal.Gui/View/Layout/ViewLayout.cs @@ -564,13 +564,11 @@ public partial class View return null; } - Rectangle startFrame = start.Frame; - if (start.InternalSubviews is { Count: > 0 }) { Point boundsOffset = start.GetBoundsOffset (); - int rx = x - (startFrame.X + boundsOffset.X); - int ry = y - (startFrame.Y + boundsOffset.Y); + int rx = x - (start.Frame.X + boundsOffset.X); + int ry = y - (start.Frame.Y + boundsOffset.Y); for (int i = start.InternalSubviews.Count - 1; i >= 0; i--) { @@ -585,8 +583,8 @@ public partial class View } } - resultX = x - startFrame.X; - resultY = y - startFrame.Y; + resultX = x - start.Frame.X; + resultY = y - start.Frame.Y; return start; }