Skip to content

Commit 42a6a63

Browse files
committed
Updated for last code changes.
1 parent b9c7cf6 commit 42a6a63

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

WeakPtrNode.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ class WeakPtrNode : BaseReferenceNode
1313
/// <summary>Size of the node in bytes.</summary>
1414
public override int MemorySize => IntPtr.Size;
1515

16+
17+
/// <summary>Disable the cycle check for pointer references.</summary>
18+
public WeakPtrNode()
19+
: base(false)
20+
{
21+
22+
}
23+
1624
/// <summary>Called when the node was created. Creates a new class as inner node.</summary>
1725
public override void Intialize()
1826
{
@@ -47,7 +55,7 @@ public override int Draw(ViewInfo view, int x, int y)
4755
x = AddText(view, x, y, FrostbitePluginExt.Settings.TypeColor, HotSpot.NoneId, "WeakPtr") + view.Font.Width;
4856
x = AddText(view, x, y, FrostbitePluginExt.Settings.NameColor, HotSpot.NameId, Name) + view.Font.Width;
4957
x = AddText(view, x, y, FrostbitePluginExt.Settings.ValueColor, HotSpot.NoneId, $"<{InnerNode.Name}>");
50-
x = AddIcon(view, x, y, Icons.Change, 4, HotSpotType.ChangeAll);
58+
x = AddIcon(view, x, y, Icons.Change, 4, HotSpotType.ChangeType);
5159

5260
x += view.Font.Width;
5361
x = AddComment(view, x, y);

WeakPtrSchemaConverter.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,13 @@ public SchemaCustomNode CreateSchemaFromElement(XElement element, IReadOnlyDicti
8484
/// <returns>The node which is represented by the schema.</returns>
8585
public BaseNode CreateNodeFromSchema(SchemaCustomNode schema, IReadOnlyDictionary<SchemaClassNode, ClassNode> classes, ILogger logger)
8686
{
87-
return new WeakPtrNode()
87+
var node = new WeakPtrNode
8888
{
8989
Name = schema.Name,
90-
Comment = schema.Comment,
91-
InnerNode = classes[(schema as WeakPtrSchemaNode).InnerNode]
90+
Comment = schema.Comment
9291
};
92+
node.ChangeInnerNode(classes[(schema as WeakPtrSchemaNode).InnerNode]);
93+
return node;
9394
}
9495

9596
/// <summary>Creates the element which represents the schema.</summary>

0 commit comments

Comments
 (0)