aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/Grid.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-02-06 15:46:32 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2016-02-06 15:46:32 +0100
commitcb91338f8038afbade79f12e04d0294b94f75228 (patch)
treef5edb1dc9e12f45f4938ed96979e4d16b1461863 /src/GraphicObjects/Grid.cs
parent4f73db4b5e1d823448b8f9c0ad3094ce23afe6c9 (diff)
simpler layouting queue test
Diffstat (limited to 'src/GraphicObjects/Grid.cs')
-rw-r--r--src/GraphicObjects/Grid.cs23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/GraphicObjects/Grid.cs b/src/GraphicObjects/Grid.cs
index 171abd61..fc3d8988 100644
--- a/src/GraphicObjects/Grid.cs
+++ b/src/GraphicObjects/Grid.cs
@@ -125,22 +125,23 @@ namespace Crow
}
}
- public override void EnqueueForLayouting ()
- {
- base.EnqueueForLayouting ();
- if (RegisteredLayoutings.HasFlag(LayoutingType.PositionChildren))
- Interface.LayoutingQueue.Enqueue (LayoutingType.PositionChildren, this);
- }
- public override void UpdateLayout (LayoutingType layoutType)
- {
+ public override bool UpdateLayout (LayoutingType layoutType)
+ {
+ RegisteredLayoutings &= (~layoutType);
+
if (layoutType == LayoutingType.PositionChildren) {
+
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);
}
#endregion