aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/PrivateContainer.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-03-09 10:35:06 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-03-09 10:35:06 +0100
commitb4347f1bf30a103a85fff5b8517fcea99ee94273 (patch)
treeee6144b1425b2356423acf822f750055aa6a8f38 /src/GraphicObjects/PrivateContainer.cs
parentcec743257e19ce55ed3e1f4f097372a278606b19 (diff)
crow ide toolbox, syntax tree depth and generalize node handling accross parser
Diffstat (limited to 'src/GraphicObjects/PrivateContainer.cs')
-rw-r--r--src/GraphicObjects/PrivateContainer.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/GraphicObjects/PrivateContainer.cs b/src/GraphicObjects/PrivateContainer.cs
index b0719ef0..668ba452 100644
--- a/src/GraphicObjects/PrivateContainer.cs
+++ b/src/GraphicObjects/PrivateContainer.cs
@@ -38,6 +38,7 @@ namespace Crow
/// TemplatedControl may have 3 children (template,templateItem,content) but
/// behave exactely as a container for layouting and drawing
/// </summary>
+ [DesignIgnore]
public class PrivateContainer : GraphicObject
{
#region CTOR
@@ -64,9 +65,8 @@ namespace Crow
if (this.Contains (IFace.HoverWidget))
IFace.HoverWidget = null;
}
- contentSize = new Size (0, 0);
+ contentSize = default(Size);
child.LayoutChanged -= OnChildLayoutChanges;
- child.Dispose ();
this.RegisterForGraphicUpdate ();
}
@@ -75,11 +75,19 @@ namespace Crow
if (child != null) {
child.Parent = this;
child.LayoutChanged += OnChildLayoutChanges;
+ child.Slot = child.LastSlots = default(Rectangle);
contentSize = child.Slot.Size;
child.RegisteredLayoutings = LayoutingType.None;
child.RegisterForLayouting (LayoutingType.Sizing);
}
}
+ //dispose child if not null
+ protected virtual void deleteChild () {
+ GraphicObject g = child;
+ SetChild (null);
+ if (g != null)
+ g.Dispose ();
+ }
#region GraphicObject Overrides