From f24ed33faaa8d7db6822a9ff4c1eff57617caf83 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bruyère Date: Wed, 14 Mar 2018 12:33:40 +0100 Subject: dragndrop of GObjs --- src/GraphicObjects/GenericStack.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/GraphicObjects/GenericStack.cs') 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); } } } -- cgit v1.3.1-4-g156e