aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/GraphicObject.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-02-20 14:17:56 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-02-20 14:22:24 +0100
commit520c769424c42841cd123e46a07b728b9f243a64 (patch)
treeeb2016499e4da7b4f085888aee4e61655ce957db /src/GraphicObjects/GraphicObject.cs
parent85c564717f2d9ab75288b2a680cdb3f58a1b0e86 (diff)
debug threading with new TemplatedGroup arch, review examples.
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
-rw-r--r--src/GraphicObjects/GraphicObject.cs26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index 9857d198..d49cbe8f 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -243,10 +243,11 @@ namespace Crow
if (parent == value)
return;
DataSourceChangeEventArgs e = new DataSourceChangeEventArgs (parent, value);
- lock (this)
+ lock (CurrentInterface.LayoutMutex) {
parent = value;
-
- onParentChanged (this, e);
+ }
+ onParentChanged (this, e);
+
}
}
[XmlIgnore]public ILayoutable LogicalParent {
@@ -786,8 +787,9 @@ namespace Crow
//prevent setting null causing stack overflow in specific case
if (dse.NewDataSource == dse.OldDataSource)
return;
-
- OnDataSourceChanged (this, dse);
+ lock (CurrentInterface.LayoutMutex) {
+ OnDataSourceChanged (this, dse);
+ }
NotifyValueChanged ("DataSource", DataSource);
}
@@ -1097,7 +1099,7 @@ namespace Crow
/// fired when drag and drop operation start
/// </summary>
protected virtual void onStartDrag (object sender, DragDropEventArgs e){
- CurrentInterface.HoverWidget = this.focusParent;
+ CurrentInterface.HoverWidget = null;
IsDragged = true;
StartDrag.Raise (this, e);
Debug.WriteLine(this.ToString() + " : START DRAG => " + e.ToString());
@@ -1136,11 +1138,13 @@ namespace Crow
#if DEBUG_UPDATE
Debug.WriteLine (string.Format("ClippingRegistration -> {0}", this.ToString ()));
#endif
- IsQueueForRedraw = false;
- if (Parent == null)
- return;
- Parent.RegisterClip (LastPaintedSlot);
- Parent.RegisterClip (Slot);
+ lock(CurrentInterface.LayoutMutex){
+ IsQueueForRedraw = false;
+ if (Parent == null)
+ return;
+ Parent.RegisterClip (LastPaintedSlot);
+ Parent.RegisterClip (Slot);
+ }
}
/// <summary>
/// Add clip rectangle to this.clipping and propagate up to root