I have ColumnView sorting working with CustomSorter on each column. Clicking the column headers sorts correctly for either column. However, when I enable multiple column sorting by calling sort_by_column on 2 columns (which should stack in reverse priority order), I can see in the GUI the column sorting indicators on both columns (the down arrow). The primary column sorts properly, however the secondary column appears to not be sorted (looks random). Any ideas?
This seems like a Gtk bug, but maybe I’m doing something wrong. I’ve posted relevant code sections below. This is D lang code using giD, but should be pretty straightforward to understand.
_columnView = new ColumnView(null);
_scrolledWindow.setChild(_columnView);
_listModel = new ListStore(GTypeEnum.Object);
foreach (artist; _daphne.library.artists)
foreach (album; artist.albums)
_listModel.append(album);
_searchFilter = new CustomFilter(&searchFilterFunc);
auto filterListModel = new FilterListModel(_listModel, _searchFilter);
auto sortModel = new SortListModel(filterListModel, _columnView.getSorter);
_selModel = new MultiSelection(sortModel);
_columnView.model = _selModel;
// ... code for adding columns
immutable Column[] DefaultSortColumns = [Column.Album, Column.Artist];
foreach (colEnum; DefaultSortColumns)
_columnView.sortByColumn(_columns[colEnum], SortType.Ascending);