From: Jean-Philippe Bruyère Date: Sun, 4 Mar 2018 12:06:13 +0000 (+0100) Subject: close win in group debug X-Git-Tag: v0.9.5-beta~153^2~27 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=90a024039580f2c097f727a277166582bf4abf7f;p=jp%2Fcrow.git close win in group debug --- diff --git a/Default.style b/Default.style index 70278cc9..3714b922 100644 --- a/Default.style +++ b/Default.style @@ -118,9 +118,9 @@ DockStack { Margin="1"; AllowDrop = "true"; Focusable="true"; - DragEnter="{Background=DarkBlue}"; - DragLeave="{Background=Jet}"; - EndDrag="{Background=Jet}"; + //DragEnter="{Background=DarkBlue}"; + //DragLeave="{Background=Jet}"; + //EndDrag="{Background=Jet}"; } DockWindow { Focusable = "true"; diff --git a/Templates/DockWindow.template b/Templates/DockWindow.template index 192c6f09..62facf06 100755 --- a/Templates/DockWindow.template +++ b/Templates/DockWindow.template @@ -1,6 +1,6 @@ - - + @@ -19,4 +19,4 @@ ---> + diff --git a/Tests/Interfaces/Experimental/testDock.crow b/Tests/Interfaces/Experimental/testDock.crow index 71301686..38727e28 100644 --- a/Tests/Interfaces/Experimental/testDock.crow +++ b/Tests/Interfaces/Experimental/testDock.crow @@ -1,6 +1,6 @@  - - + + diff --git a/Tests/Interfaces/Experimental/testDock2.crow b/Tests/Interfaces/Experimental/testDock2.crow new file mode 100644 index 00000000..71301686 --- /dev/null +++ b/Tests/Interfaces/Experimental/testDock2.crow @@ -0,0 +1,26 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 30fe50c3..c9b68603 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -376,6 +376,9 @@ PreserveNewest + + PreserveNewest + diff --git a/src/GraphicObjects/DockStack.cs b/src/GraphicObjects/DockStack.cs index 4800c0aa..bb5bf3a4 100644 --- a/src/GraphicObjects/DockStack.cs +++ b/src/GraphicObjects/DockStack.cs @@ -297,7 +297,7 @@ namespace Crow return; instStack = IFace.CreateITorFromIMLFragment (@""); instSplit = IFace.CreateITorFromIMLFragment (@""); - instSpacer = IFace.CreateITorFromIMLFragment (@""); + instSpacer = IFace.CreateITorFromIMLFragment (@""); } } diff --git a/src/GraphicObjects/DockWindow.cs b/src/GraphicObjects/DockWindow.cs index 7924588e..3617f5b9 100644 --- a/src/GraphicObjects/DockWindow.cs +++ b/src/GraphicObjects/DockWindow.cs @@ -183,6 +183,12 @@ namespace Crow target.Dock (this); } } + protected override void close () + { + if (isDocked) + Undock (); + base.close (); + } } } 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; + } } } }