ObjectListView icon indicating copy to clipboard operation
ObjectListView copied to clipboard

FastObjectListView with custom sorter does not abide by SortOrder.None

Open PyroGenesis opened this issue 3 years ago • 0 comments
trafficstars

I have a FastObjectListView with its custom Sort() defined within its VirtualListDataSource. The issue I'm facing is that even if I set the SortOrder of the FOLV to SortOrder.None, it will still attempt to sort in ascending order whenever any addition / deletion occurs.

I saw that insertion and deletion of objects will always attempt to sort and I followed the issue to this block of code: https://github.com/geomatics-io/ObjectListView/blob/8a10cbd934adca7991b2447298a9f22c67368a70/ObjectListView/ObjectListView.cs#L8357-L8383

When line 8358 executes, args.SortOrder will be set to SortOrder.Ascending even if the parameter order is set to SortOrder.None due to this block of code: https://github.com/geomatics-io/ObjectListView/blob/8a10cbd934adca7991b2447298a9f22c67368a70/ObjectListView/ObjectListView.cs#L4099-L4103

Therefore, execution will reach line 8378 and the CustomSorter will be provided a SortOrder of Ascending instead of None.

PyroGenesis avatar Apr 20 '22 16:04 PyroGenesis