diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2017-03-01 07:00:56 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2017-03-01 07:01:45 +0100 |
| commit | 58f542eb60e38f7b491edbbc6b9d22f0d69b68ff (patch) | |
| tree | 6263932a16f242916623929ebd416c3245d1be63 /src/GraphicObjects/GraphicObject.cs | |
| parent | 1d136a46481bbeffc00ac7d54bc3098cd32ca5a1 (diff) | |
restore lock in Visible prop of GO
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 16 |
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 |