diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-06 15:46:32 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-06 15:46:32 +0100 |
| commit | cb91338f8038afbade79f12e04d0294b94f75228 (patch) | |
| tree | f5edb1dc9e12f45f4938ed96979e4d16b1461863 /src/GraphicObjects/GenericStack.cs | |
| parent | 4f73db4b5e1d823448b8f9c0ad3094ce23afe6c9 (diff) | |
simpler layouting queue test
Diffstat (limited to 'src/GraphicObjects/GenericStack.cs')
| -rw-r--r-- | src/GraphicObjects/GenericStack.cs | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/GraphicObjects/GenericStack.cs b/src/GraphicObjects/GenericStack.cs index c49c5307..5de21fac 100644 --- a/src/GraphicObjects/GenericStack.cs +++ b/src/GraphicObjects/GenericStack.cs @@ -109,19 +109,11 @@ namespace Crow } bmp = null; } + + public override bool UpdateLayout (LayoutingType layoutType) + { + RegisteredLayoutings &= (~layoutType); - public override void EnqueueForLayouting () - { - if (Parent == null) - return; - - base.EnqueueForLayouting (); - - if (RegisteredLayoutings.HasFlag(LayoutingType.PositionChildren)) - Interface.LayoutingQueue.Enqueue (LayoutingType.PositionChildren, this); - } - public override void UpdateLayout (LayoutingType layoutType) - { if (layoutType == LayoutingType.PositionChildren) { //allow 1 child to have size to 0 if stack has fixed or streched size, //this child will occupy remaining space @@ -165,13 +157,18 @@ namespace Crow } } } - } + } + ComputeChildrenPositions (); + //if no layouting remains in queue for item, registre for redraw - if (RegisteredLQINodes.Count () <= 0 && bmp==null) + if (RegisteredLayoutings == LayoutingType.None && bmp==null) this.RegisterForRedraw (); - }else - base.UpdateLayout(layoutType); + + return true; + } + + return base.UpdateLayout(layoutType); } public override void OnLayoutChanges (LayoutingType layoutType) { |