diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-03-04 13:06:13 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-03-04 13:06:13 +0100 |
| commit | 90a024039580f2c097f727a277166582bf4abf7f (patch) | |
| tree | 06c033e731896ce43fdbb1e3c17a593a1edd1c94 /src/GraphicObjects/Window.cs | |
| parent | dbe64f1bcf768c02ca62314559b5657197b7453c (diff) | |
close win in group debug
Diffstat (limited to 'src/GraphicObjects/Window.cs')
| -rw-r--r-- | src/GraphicObjects/Window.cs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/GraphicObjects/Window.cs b/src/GraphicObjects/Window.cs index 4eef9696..6a15d016 100644 --- a/src/GraphicObjects/Window.cs +++ b/src/GraphicObjects/Window.cs @@ -437,14 +437,21 @@ namespace Crow close (); } - protected void close(){ + protected virtual void close(){ Closing.Raise (this, null); if (Parent is Interface) (Parent as Interface).DeleteWidget (this); - else if (Parent is Group) - (Parent as Group).DeleteChild (this); - else if (Parent is PrivateContainer) - (Parent as Container).Child = null; + else { + GraphicObject p = Parent as GraphicObject; + if (p is Group) { + lock (IFace.UpdateMutex) { + RegisterClip (p.ScreenCoordinates (p.LastPaintedSlot)); + (p as Group).DeleteChild (this); + } + //(Parent as Group).RegisterForRedraw (); + } else if (Parent is PrivateContainer) + (Parent as Container).Child = null; + } } } } |