From 40392cc3bcaee5b67d85b0aabfd42d2881823bd6 Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Sat, 2 May 2015 09:19:19 +0200 Subject: Layouting queue, debug test4 validated --- src/GraphicObjects/GenericStack.cs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'src/GraphicObjects/GenericStack.cs') diff --git a/src/GraphicObjects/GenericStack.cs b/src/GraphicObjects/GenericStack.cs index 04e63d15..f34e13d3 100644 --- a/src/GraphicObjects/GenericStack.cs +++ b/src/GraphicObjects/GenericStack.cs @@ -24,8 +24,9 @@ namespace go public override T addChild (T child) { + T tmp = base.addChild (child); this.RegisterForLayouting ((int)LayoutingType.PositionChildren); - return base.addChild (child); + return tmp; } public override void removeChild (GraphicObject child) { @@ -96,17 +97,7 @@ namespace go } } } -// public void RegisterForLayouting () -// { -// base.RegisterForLayouting (); -// -// int idx = Interface.LayoutingQueue.IndexOf (Interface.LayoutingQueue.Where (lq => lq.GraphicObject.Parent == this).LastOrDefault ()); -// if (idx < 0) -// return; -// Interface.LayoutingQueue.Insert ( -// idx+1, -// new LayoutingQueueItem (LayoutingType.PositionChildren, this)); -// } + public override void RegisterForLayouting (int layoutType) { base.RegisterForLayouting (layoutType); -- cgit v1.3.1-4-g156e