From: jpbruyere Date: Sat, 6 Feb 2016 11:52:31 +0000 (+0100) Subject: prevent stretched child from positionning in the direction of the stack X-Git-Tag: 0.3~42^2~9 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=10f12671dcbbaa2ef0e5723bbf84e88cdeaf98e1;p=jp%2Fcrow.git prevent stretched child from positionning in the direction of the stack --- diff --git a/src/GraphicObjects/GenericStack.cs b/src/GraphicObjects/GenericStack.cs index 5a83be72..c49c5307 100644 --- a/src/GraphicObjects/GenericStack.cs +++ b/src/GraphicObjects/GenericStack.cs @@ -96,13 +96,15 @@ namespace Crow foreach (GraphicObject c in Children.Where(ch=>ch.Visible)) { c.Slot.X = d; d += c.Slot.Width + Spacing; - c.RegisterForLayouting (LayoutingType.Y); + if (c.Height != 0) + c.RegisterForLayouting (LayoutingType.Y); } } else { foreach (GraphicObject c in Children.Where(ch=>ch.Visible)) { c.Slot.Y = d; d += c.Slot.Height + Spacing; - c.RegisterForLayouting (LayoutingType.X); + if (c.Width != 0) + c.RegisterForLayouting (LayoutingType.X); } } bmp = null;