aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/GraphicObject.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-08-04 15:45:02 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2016-08-04 15:45:02 +0200
commite2d351c9de4ee9c8b04376228f3ab5b9310392c9 (patch)
treec6071ae81222ee037aa14c4e762e3e16c43826ff /src/GraphicObjects/GraphicObject.cs
parent3a01c455e09af25109239ab7ca32e66ea1ebc99b (diff)
Set regLayout.ALL to new object to prevent queuing in layout or
drawing, set to regLayout.None just before adding parent LayoutingTries moved into LQI
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
-rw-r--r--src/GraphicObjects/GraphicObject.cs15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index 3bdc354d..20173172 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -25,9 +25,6 @@ namespace Crow
internal static ulong currentUid = 0;
internal ulong uid = 0;
-
- internal int layoutingTries = 0;
-
Rectangles clipping = new Rectangles();
public Rectangles Clipping { get { return clipping; }}
@@ -62,7 +59,7 @@ namespace Crow
#endregion
#region private fields
- LayoutingType registeredLayoutings = LayoutingType.None;
+ LayoutingType registeredLayoutings = LayoutingType.All;
ILayoutable logicalParent;
ILayoutable _parent;
string _name = "unamed";
@@ -742,20 +739,18 @@ namespace Crow
bmp = null;
if (Width == Measure.Fit || Height == Measure.Fit)
RegisterForLayouting (LayoutingType.Sizing);
- Interface.CurrentInterface.EnqueueForRepaint (this);
+ else if (RegisteredLayoutings == LayoutingType.None)
+ Interface.CurrentInterface.EnqueueForRepaint (this);
}
/// <summary> query an update of the content, a redraw </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void RegisterForRedraw ()
{
bmp = null;
- Interface.CurrentInterface.EnqueueForRepaint (this);
+ if (RegisteredLayoutings == LayoutingType.None)
+ Interface.CurrentInterface.EnqueueForRepaint (this);
}
#region Layouting
- [XmlIgnore]public int LayoutingTries {
- get { return layoutingTries; }
- set { layoutingTries = value; }
- }
internal Size contentSize;
/// <summary> return size of content + margins </summary>
protected virtual int measureRawSize (LayoutingType lt) {