aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/GenericStack.cs
diff options
context:
space:
mode:
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);
}
}
}