aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/GenericStack.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-03-14 12:33:40 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-03-14 12:33:40 +0100
commit2c8ebf731af0a626c5d684efc5c2853edd8c3c2d (patch)
tree8beeb9d4f53183db21614f0dddc16859d246c339 /src/GraphicObjects/GenericStack.cs
parentfda39ed7506551ab48dce271cb2d5e9c63f2b00c (diff)
dragndrop of GObjs
Diffstat (limited to 'src/GraphicObjects/GenericStack.cs')
-rw-r--r--src/GraphicObjects/GenericStack.cs18
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);
}
}
}