]> O.S.I.I.S - jp/crow.git/commitdiff
prevent stretched child from positionning in the direction of the stack
authorjpbruyere <jp.bruyere@hotmail.com>
Sat, 6 Feb 2016 11:52:31 +0000 (12:52 +0100)
committerjpbruyere <jp.bruyere@hotmail.com>
Sat, 6 Feb 2016 11:52:31 +0000 (12:52 +0100)
src/GraphicObjects/GenericStack.cs

index 5a83be72c0c9da04ce198b0514d852bdb27bd089..c49c5307ea287a23498cc894e5f6036dbc194916 100644 (file)
@@ -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;