Skip to content

Commit

Permalink
Fix #3332: Re-apply filter to all descendants.
Browse files Browse the repository at this point in the history
  • Loading branch information
siegfriedpammer committed Nov 18, 2024
1 parent 7ee01ba commit 1730234
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions ILSpy/TreeNodes/ILSpyTreeNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
using ICSharpCode.ILSpy.AssemblyTree;
using ICSharpCode.ILSpy.Docking;
using ICSharpCode.ILSpyX.Abstractions;
using ICSharpCode.ILSpyX.TreeView.PlatformAbstractions;
using ICSharpCode.ILSpyX.TreeView;
using ICSharpCode.ILSpyX.TreeView.PlatformAbstractions;

namespace ICSharpCode.ILSpy.TreeNodes
{
Expand Down Expand Up @@ -130,9 +130,6 @@ void ApplyFilterToChild(ILSpyTreeNode child)
child.IsHidden = false;
break;
case FilterResult.Recurse:
child.EnsureChildrenFiltered();
child.IsHidden = child.Children.All(c => c.IsHidden);
break;
case FilterResult.MatchAndRecurse:
child.EnsureChildrenFiltered();
child.IsHidden = child.Children.All(c => c.IsHidden);
Expand Down Expand Up @@ -161,16 +158,12 @@ protected virtual void Settings_Changed(object sender, PropertyChangedEventArgs
}
}


internal void EnsureChildrenFiltered()
{
EnsureLazyChildren();
if (childrenNeedFiltering)
{
childrenNeedFiltering = false;
foreach (ILSpyTreeNode node in this.Children.OfType<ILSpyTreeNode>())
ApplyFilterToChild(node);
}
childrenNeedFiltering = false;
foreach (ILSpyTreeNode node in this.Children.OfType<ILSpyTreeNode>())
ApplyFilterToChild(node);
}

protected string GetSuffixString(IMember member) => GetSuffixString(member.MetadataToken);
Expand Down

0 comments on commit 1730234

Please sign in to comment.