Fix GetDeepAttributes() - GetAllItems() means no recursion required
This commit is contained in:
@@ -454,14 +454,14 @@ namespace UIFixes
|
|||||||
{
|
{
|
||||||
changed = false;
|
changed = false;
|
||||||
List<ItemAttributeClass> itemAttributes = item.Attributes.Where(a => a.DisplayType() == EItemAttributeDisplayType.Compact).ToList();
|
List<ItemAttributeClass> itemAttributes = item.Attributes.Where(a => a.DisplayType() == EItemAttributeDisplayType.Compact).ToList();
|
||||||
foreach (var subItem in item.GetAllItems())
|
foreach (var subItem in item.GetAllItems()) // This get all items, recursively
|
||||||
{
|
{
|
||||||
if (subItem == item)
|
if (subItem == item)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var subAttributes = GetDeepAttributes(subItem, out changed);
|
var subAttributes = subItem.Attributes.Where(a => a.DisplayType() == EItemAttributeDisplayType.Compact).ToList();
|
||||||
itemAttributes = CombineAttributes(itemAttributes, subAttributes).ToList();
|
itemAttributes = CombineAttributes(itemAttributes, subAttributes).ToList();
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user