From df59ae7260a393b98ed467fbfd6a83c8b8059133 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 24 Aug 2019 15:14:16 +0200 Subject: [PATCH] make sure to always pick the closest older sibling --- MLEM.Ui/Elements/Element.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MLEM.Ui/Elements/Element.cs b/MLEM.Ui/Elements/Element.cs index 11ffd41..bbc69d1 100644 --- a/MLEM.Ui/Elements/Element.cs +++ b/MLEM.Ui/Elements/Element.cs @@ -343,7 +343,7 @@ namespace MLEM.Ui.Elements { continue; if (child.Anchor > Anchor.TopRight && child.Anchor < Anchor.AutoLeft) continue; - if (lowest == null || child.Area.Bottom > lowest.Area.Bottom) + if (lowest == null || child.Area.Bottom >= lowest.Area.Bottom) lowest = child; } return lowest;