Skip to content

Commit 7461e9f

Browse files
committed
Added temporary second parent node member.
1 parent 862d04f commit 7461e9f

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

ReClass.NET/Nodes/BaseContainerNode.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ public virtual bool ReplaceChildNode(int index, Type nodeType, ref List<BaseNode
136136
createdNodes?.Add(node);
137137

138138
node.ParentNode = this;
139+
node.ParentNode2 = this;
139140

140141
nodes[index] = node;
141142

@@ -216,7 +217,7 @@ public virtual void InsertBytes(int index, int size, ref List<BaseNode> createdN
216217
node = new Hex8Node();
217218
}
218219

219-
node.ParentNode = this;
220+
node.ParentNode2 = this;
220221
node.Offset = offset;
221222

222223
nodes.Insert(index, node);
@@ -253,7 +254,7 @@ public virtual void InsertNode(int index, BaseNode node)
253254
Contract.Requires(index >= 0);
254255
Contract.Requires(node != null);
255256

256-
node.ParentNode = this;
257+
node.ParentNode2 = this;
257258

258259
nodes.Insert(index, node);
259260
}

ReClass.NET/Nodes/BaseNode.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@ public abstract class BaseNode
4040
/// <summary>Gets or sets the parent node.</summary>
4141
public BaseContainerNode ParentNode { get; internal set; }
4242

43-
/// <summary>Gets or sets a value indicating whether this node is wrapped into an other node.</summary>
44-
public bool IsWrapped { get; internal set; }
43+
/// <summary>Gets or sets the parent node.</summary>
44+
public BaseNode ParentNode2 { get; internal set; }
45+
46+
/// <summary>Gets a value indicating whether this node is wrapped into an other node.</summary>
47+
public bool IsWrapped => ParentNode2 is BaseWrapperNode;
4548

4649
/// <summary>Gets or sets a value indicating whether this node is hidden.</summary>
4750
public bool IsHidden { get; set; }

ReClass.NET/Nodes/BaseWrapperNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void ChangeInnerNode(BaseNode node)
3535

3636
if (node != null)
3737
{
38-
node.IsWrapped = true;
38+
node.ParentNode2 = this;
3939
}
4040

4141
InnerNodeChanged?.Invoke(this);

ReClass.NET/Nodes/VTableNode.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ public override void InsertBytes(int index, int size, ref List<BaseNode> created
131131
var node = new VMethodNode
132132
{
133133
Offset = offset,
134-
ParentNode = this
134+
ParentNode = this,
135+
ParentNode2 = this
135136
};
136137

137138
nodes.Insert(index, node);

0 commit comments

Comments
 (0)