aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/GraphicObject.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2015-12-23 18:24:28 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2015-12-23 18:24:28 +0100
commitb6fccb76291456485af671082b58e18fe37d395e (patch)
tree5f28a86d4a66df545e5c1e82eb75fa091d60ae86 /src/GraphicObjects/GraphicObject.cs
parent8678a1351e90c94741661a83efefdce8e7493b01 (diff)
Prevent multiple template loading
debug group and stack layouting , onLayoutChanged divers debug
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
-rw-r--r--src/GraphicObjects/GraphicObject.cs19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index 0374527d..4c68236d 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -493,6 +493,9 @@ namespace go
{
if (Parent == null)
return;
+ #if DEBUG_LAYOUTING
+ Debug.WriteLine ("RegisterForLayouting => {1}->{0}", layoutType, this.ToString());
+ #endif
lock (Interface.LayoutingQueue) {
Interface.LayoutingQueue.RemoveAll (lq => lq.GraphicObject == this && (layoutType & (int)lq.LayoutType) > 0);
@@ -504,9 +507,9 @@ namespace go
Width = -1;
if (Bounds.Width == 0) //stretch in parent
- Interface.LayoutingQueue.EnqueueAfterParentSizing (LayoutingType.Width, this);
+ Interface.LayoutingQueue.EnqueueAfterParentSizing (LayoutingType.Width, this);
else if (Bounds.Width < 0) //fit
- Interface.LayoutingQueue.EnqueueBeforeParentSizing (LayoutingType.Width, this);
+ Interface.LayoutingQueue.EnqueueBeforeParentSizing (LayoutingType.Width, this);
else
Interface.LayoutingQueue.Insert (0, new LayoutingQueueItem (LayoutingType.Width, this));
}
@@ -518,20 +521,20 @@ namespace go
Height = -1;
if (Bounds.Height == 0) //stretch in parent
- Interface.LayoutingQueue.EnqueueAfterParentSizing (LayoutingType.Height, this);
+ Interface.LayoutingQueue.EnqueueAfterParentSizing (LayoutingType.Height, this);
else if (Bounds.Height < 0) //fit
- Interface.LayoutingQueue.EnqueueBeforeParentSizing (LayoutingType.Height, this);
+ Interface.LayoutingQueue.EnqueueBeforeParentSizing (LayoutingType.Height, this);
else
Interface.LayoutingQueue.Insert (0, new LayoutingQueueItem (LayoutingType.Height, this));
}
if ((layoutType & (int)LayoutingType.X) > 0)
- //for x positionning, sizing of parent and this have to be done
- Interface.LayoutingQueue.EnqueueAfterThisAndParentSizing (LayoutingType.X, this);
+ //for x positionning, sizing of parent and this have to be done
+ Interface.LayoutingQueue.EnqueueAfterThisAndParentSizing (LayoutingType.X, this);
if ((layoutType & (int)LayoutingType.Y) > 0)
- //for x positionning, sizing of parent and this have to be done
- Interface.LayoutingQueue.EnqueueAfterThisAndParentSizing (LayoutingType.Y, this);
+ //for x positionning, sizing of parent and this have to be done
+ Interface.LayoutingQueue.EnqueueAfterThisAndParentSizing (LayoutingType.Y, this);
}
}