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 | f24ed33faaa8d7db6822a9ff4c1eff57617caf83 (patch) | |
| tree | 4cfccee06d5b7a652f8aafae0f93b4a3c54c5670 /src/GraphicObjects/GenericStack.cs | |
| parent | 5f1d0213e0dadecc8f93d44e36ea3a11a1aa9baa (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); } } } |