aboutsummaryrefslogtreecommitdiffstatsci
path: root/src
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-09-13 11:55:49 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2016-09-13 11:55:49 +0200
commitecc2ebe1571d05746ba262fec231d007a0f21ff7 (patch)
tree9e574f6a5b9a44d5de77244ace848a5757a3aa14 /src
parentd78c8184cac1fb7e855259852c84fe69c92db33a (diff)
test already registeredLayouting at the beginning of RegisterForLayouting
Diffstat (limited to 'src')
-rw-r--r--src/GraphicObjects/GraphicObject.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index ffa2d480..093664d1 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -729,7 +729,7 @@ namespace Crow
public void RegisterForGraphicUpdate ()
{
bmp = null;
- if (Width == Measure.Fit || Height == Measure.Fit)
+ if (Width.IsFit || Height.IsFit)
RegisterForLayouting (LayoutingType.Sizing);
else if (RegisteredLayoutings == LayoutingType.None)
CurrentInterface.EnqueueForRepaint (this);
@@ -759,6 +759,11 @@ namespace Crow
if (Parent == null)
return;
lock (CurrentInterface.LayoutMutex) {
+ //prevent queueing same LayoutingType for this
+ layoutType &= (~RegisteredLayoutings);
+
+ if (layoutType == LayoutingType.None)
+ return;
//dont set position for stretched item
if (Width == Measure.Stretched)
layoutType &= (~LayoutingType.X);
@@ -772,8 +777,8 @@ namespace Crow
if (Parent is GraphicObject)
(Parent as GraphicObject).ChildrenLayoutingConstraints (ref layoutType);
- //prevent queueing same LayoutingType for this
- layoutType &= (~RegisteredLayoutings);
+// //prevent queueing same LayoutingType for this
+// layoutType &= (~RegisteredLayoutings);
if (layoutType == LayoutingType.None)
return;