Open KubeRoot opened 9 months ago
After getting the Avalonia v11 upgrade to (barely) run and testing, it seems to indeed not have the issue this fixes. I'm gonna leave this open just in case, but probably should be closed in favor of the Avalonia upgrade.
Fixes the following two (related) issues:
This PR changes
TreeFlattener
to implementIList<object>
. The cause of the issue is the following line in Avalonia: SelectionModel.cs#L36 Specifically, when changing the selection programmatically, theSelectionModel
tries to find the indices of any entries added to the selection in the source, to generate the ranges. However, since the source is casted toIEnumerable<object>
here, casting theTreeFlattener
results innull
, causing theSelectionModel
to abort updating the selection.'Might be superseded by:
Looks like an update to Avalonia might fix this issue: ba7e8a2 It seems like the current master branch uses
IEnumerable
instead ofIEnumerable<T>
, which should sidestep the problem.