mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
Sorting reorders the assembly list in place and reports it as a Move, which nothing downstream could act on: the tree node's handler had cases for Add, Remove and Reset only, and neither the child collection nor the flattener had a move at all. The rows therefore kept their pre-sort order until something else forced a rebuild. Moving the node rather than removing and re-inserting it keeps its identity, so an expanded subtree stays expanded and its row is not rebuilt. A run longer than one row has to be reported the way the consumer reads it: Avalonia's VirtualizingStackPanel applies a ranged move by removing OldItems.Count rows and re-inserting them at NewStartingIndex - (Count - 1), so a run reported by its final start index lands short by its own length. For a single row - a collapsed node, and every move a sort makes - the two readings coincide. Assisted-by: Claude:claude-opus-5[1m]:Claude Codepull/4138/head
6 changed files with 225 additions and 0 deletions
Loading…
Reference in new issue