diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2017-04-19 12:35:13 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2017-04-19 12:35:13 +0200 |
| commit | 3ac2511698deed3c0fde54d6fcec64f9162b5cd0 (patch) | |
| tree | e863c700953f08644e4a73a85c2f733ddb10d375 /src/GraphicObjects/GraphicObject.cs | |
| parent | d83f78d3787b9dc035130ebb6e056b6e2f0ca788 (diff) | |
complete set invisible with normal layouting
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index 2afbe336..0db8fb54 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -539,22 +539,10 @@ namespace Crow isVisible = value; - if (isVisible) - RegisterForLayouting (LayoutingType.Sizing); - else { - 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; - } - } + RegisterForLayouting (LayoutingType.Sizing); //trigger a mouse to handle possible hover changes - CurrentInterface.ProcessMouseMove (CurrentInterface.Mouse.X, CurrentInterface.Mouse.Y); + //CurrentInterface.ProcessMouseMove (CurrentInterface.Mouse.X, CurrentInterface.Mouse.Y); NotifyValueChanged ("Visible", isVisible); } @@ -854,14 +842,15 @@ namespace Crow /// </summary> /// <param name="clip">Clip rectangle</param> public virtual void RegisterClip(Rectangle clip){ + Rectangle r = clip + ClientRectangle.Position; if (CacheEnabled && !IsDirty) - Clipping.AddRectangle (clip + ClientRectangle.Position); + Clipping.AddRectangle (r); if (Parent == null) return; GraphicObject p = Parent as GraphicObject; if (p?.IsDirty == true && p?.CacheEnabled == true) return; - Parent.RegisterClip (clip + Slot.Position + ClientRectangle.Position); + Parent.RegisterClip (r + Slot.Position); } /// <summary> Full update, taking care of sizing policy </summary> [MethodImpl(MethodImplOptions.AggressiveInlining)] |