diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-03-14 12:33:40 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-03-14 12:33:40 +0100 |
| commit | 2c8ebf731af0a626c5d684efc5c2853edd8c3c2d (patch) | |
| tree | 8beeb9d4f53183db21614f0dddc16859d246c339 /src/GraphicObjects/GenericStack.cs | |
| parent | fda39ed7506551ab48dce271cb2d5e9c63f2b00c (diff) | |
dragndrop of GObjs
Diffstat (limited to 'src/GraphicObjects/GenericStack.cs')
| -rw-r--r-- | src/GraphicObjects/GenericStack.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/GraphicObjects/GenericStack.cs b/src/GraphicObjects/GenericStack.cs index 181c41c2..64841d4b 100644 --- a/src/GraphicObjects/GenericStack.cs +++ b/src/GraphicObjects/GenericStack.cs @@ -227,20 +227,20 @@ namespace Crow public override void RemoveChild (GraphicObject child) { + if (child != stretchedGO) { + if (Orientation == Orientation.Horizontal) + contentSize.Width -= child.LastSlots.Width; + else + contentSize.Height -= child.LastSlots.Height; + } base.RemoveChild (child); if (child == stretchedGO) { - //stretchedGO.LastSlots = default(Rectangle); stretchedGO = null; RegisterForLayouting (LayoutingType.Sizing); - return; - } - if (Orientation == Orientation.Horizontal) { - contentSize.Width -= child.LastSlots.Width; + }else if (Orientation == Orientation.Horizontal) adjustStretchedGo (LayoutingType.Width); - } else { - contentSize.Height -= child.LastSlots.Height; - adjustStretchedGo (LayoutingType.Height); - } + else + adjustStretchedGo (LayoutingType.Height); } } } |