Merge remote-tracking branch 'Exter-N/rt-filtering'

This commit is contained in:
Ottermandias 2023-11-29 17:47:58 +01:00
commit e0749bb791
6 changed files with 173 additions and 28 deletions

View file

@ -9,6 +9,7 @@ public class ResourceNode : ICloneable
public string? Name;
public string? FallbackName;
public ChangedItemIcon Icon;
public ChangedItemIcon DescendentIcons;
public readonly ResourceType Type;
public readonly nint ObjectAddress;
public readonly nint ResourceHandle;
@ -49,6 +50,7 @@ public class ResourceNode : ICloneable
Name = other.Name;
FallbackName = other.FallbackName;
Icon = other.Icon;
DescendentIcons = other.DescendentIcons;
Type = other.Type;
ObjectAddress = other.ObjectAddress;
ResourceHandle = other.ResourceHandle;

View file

@ -171,6 +171,9 @@ public class ResourceTreeFactory
{
if (node.Name == parent?.Name)
node.Name = null;
if (parent != null)
parent.DescendentIcons |= node.Icon | node.DescendentIcons;
});
}