Description
Issue was discovered in 2.2.16.0 but also happens in 2.2.16.1 (just quickly checked it).
Trying to sort by Input (or by anything in items and fluids tab) causing the following error:
System.InvalidOperationException: Failed to compare two elements in the array. ---> System.InvalidCastException: Unable to cast object of type 'Foreman.ItemQualityPair' to type 'Foreman.DataObjectBase'.
at Foreman.GraphSummaryForm.<>c__DisplayClass48_0.<ItemListView_ColumnSort>b__0(ListViewItem a, ListViewItem b) in D:\software\Factorios\Foreman 2\Foreman\Forms\GraphSummaryForm.cs:line 540
at System.Collections.Generic.ArraySortHelper1.InsertionSort(T[] keys, Int32 lo, Int32 hi, IComparer
1 comparer)
at System.Collections.Generic.ArraySortHelper1.IntrospectiveSort(T[] keys, Int32 left, Int32 length, IComparer
1 comparer)
at System.Collections.Generic.ArraySortHelper1.Sort(T[] keys, Int32 index, Int32 length, IComparer
1 comparer)
--- End of inner exception stack trace ---
at System.Collections.Generic.ArraySortHelper1.Sort(T[] keys, Int32 index, Int32 length, IComparer
1 comparer)
at System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer1 comparer) at System.Collections.Generic.List
1.Sort(Comparison1 comparison) at Foreman.GraphSummaryForm.ItemListView_ColumnSort(List
1 unfilteredList, List`1 filteredList, ListView owner, Int32 column) in D:\software\Factorios\Foreman 2\Foreman\Forms\GraphSummaryForm.cs:line 547
at Foreman.GraphSummaryForm.ItemsListView_ColumnClick(Object sender, ColumnClickEventArgs e) in D:\software\Factorios\Foreman 2\Foreman\Forms\GraphSummaryForm.cs:line 524
at System.Windows.Forms.ListView.OnColumnClick(ColumnClickEventArgs e)
at System.Windows.Forms.ListView.WmNotify(Message& m)
at System.Windows.Forms.ListView.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)