From: jpbruyere Date: Wed, 19 Apr 2017 10:35:13 +0000 (+0200) Subject: complete set invisible with normal layouting X-Git-Tag: 0.6.0~48 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=43c034828b0773c4df7470943724f5966ee1bb4c;p=jp%2Fcrow.git complete set invisible with normal layouting --- 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 /// /// Clip rectangle 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); } /// Full update, taking care of sizing policy [MethodImpl(MethodImplOptions.AggressiveInlining)]