aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/GraphicObject.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
-rw-r--r--src/GraphicObjects/GraphicObject.cs16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index 059fc568..22bfdea2 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -516,13 +516,15 @@ namespace Crow
if (isVisible)
RegisterForLayouting (LayoutingType.Sizing);
else {
- Slot.Width = 0;
- LayoutChanged.Raise (this, new LayoutingEventArgs (LayoutingType.Width));
- Slot.Height = 0;
- LayoutChanged.Raise (this, new LayoutingEventArgs (LayoutingType.Height));
- if (this.parent != null)
- CurrentInterface.EnqueueForRepaint (this);
- LastSlots.Width = LastSlots.Height = 0;
+ lock (CurrentInterface.UpdateMutex) {
+ Slot.Width = 0;
+ LayoutChanged.Raise (this, new LayoutingEventArgs (LayoutingType.Width));
+ Slot.Height = 0;
+ LayoutChanged.Raise (this, new LayoutingEventArgs (LayoutingType.Height));
+ if (this.parent != null)
+ CurrentInterface.EnqueueForRepaint (this);
+ LastSlots.Width = LastSlots.Height = 0;
+ }
}
//trigger a mouse to handle possible hover changes