diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-09-13 11:55:49 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-09-13 11:55:49 +0200 |
| commit | 10554f8a78a6981f5e49e46a32b3eee5911b872e (patch) | |
| tree | d72bf59d3faf950daca6467c4c9f85c5f232dd27 /src | |
| parent | 8edb058b753532a17002c2e851c483a63d839e24 (diff) | |
test already registeredLayouting at the beginning of RegisterForLayouting
Diffstat (limited to 'src')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 11 |
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; |