mirror of
https://github.com/eliasstepanik/OSCADSharpDotnet7.git
synced 2026-01-12 05:58:34 +00:00
+ Added internal Parent reference / made assignments to it when operations occur
This commit is contained in:
parent
a4613ea79d
commit
8506459939
@ -262,6 +262,11 @@ namespace OSCADSharp
|
||||
return this.ToString() == other.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The parent of this object in its OSCADObject tree
|
||||
/// </summary>
|
||||
internal OSCADObject Parent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Internal collection of children for this object
|
||||
/// </summary>
|
||||
|
||||
@ -20,6 +20,10 @@ namespace OSCADSharp.Scripting
|
||||
{
|
||||
this.outerStatement = outerStatement;
|
||||
this.children = children.ToList();
|
||||
foreach (var child in children)
|
||||
{
|
||||
child.Parent = this;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
||||
@ -33,6 +33,7 @@ namespace OSCADSharp.Transforms
|
||||
this.Opacity = opacity;
|
||||
|
||||
this.children.Add(obj);
|
||||
obj.Parent = this;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
||||
@ -35,6 +35,7 @@ namespace OSCADSharp.Transforms
|
||||
this.Height = height;
|
||||
|
||||
this.children.Add(obj);
|
||||
obj.Parent = this;
|
||||
}
|
||||
|
||||
public override OSCADObject Clone()
|
||||
|
||||
@ -32,6 +32,7 @@ namespace OSCADSharp.Transforms
|
||||
this.Normal = normal;
|
||||
|
||||
this.children.Add(obj);
|
||||
obj.Parent = this;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
||||
@ -30,6 +30,7 @@ namespace OSCADSharp.Transforms
|
||||
this.Size = size;
|
||||
|
||||
this.children.Add(obj);
|
||||
obj.Parent = this;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
||||
@ -30,6 +30,7 @@ namespace OSCADSharp.Transforms
|
||||
this.Angle = angle;
|
||||
|
||||
this.children.Add(obj);
|
||||
obj.Parent = this;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
||||
@ -30,6 +30,7 @@ namespace OSCADSharp.Transforms
|
||||
this.ScaleFactor = scale;
|
||||
|
||||
this.children.Add(obj);
|
||||
obj.Parent = this;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
||||
@ -27,6 +27,7 @@ namespace OSCADSharp.Transforms
|
||||
this.Vector = vector;
|
||||
|
||||
this.children.Add(obj);
|
||||
obj.Parent = this;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user