Bug 0012824 has been filed about the sort order in Descendants gramplet, although it extends to other list (tree) views when sort column and order aren’t explicitly set.
In the bug report @GeorgeWilmes observed that when the Descendant Gramplet is first populated the data is shown in a particular order and at that point neither column (name, birth date) has a sort order indicator which I believe is confusing since the UI for a sortable column should indicate that clearly. Once either column header is selected for sorting, the initial unsorted order is not attainable again which is the complaint.
Based on my reading of the code, this is because the initial sort column and sort order are not set for a new list (tree) view (or perhaps more correctly, model) which seems like a bug. A simple patch is attached to the bug which sorts on the first column in ascending order (arbitrary choice, but seems reasonable). Should the behavior of list (tree) model be changed in this way? Doing so makes the sort column and order explicit and visible in the UI leading to consistent behavior. Two concerns with this:
- Some users do/may want current unsorted behavior, although it’s arguable that it’s not standard behavior which can’t be restored without additional UI controls/behavior, and
- Since this change would affect any models based on ListModel in Gramps, it’s not a change to make without due consideration. In fact the proposed behavior may have been present in Gramps v2.2.0 and prior based on source history (links in the bug report) but was changed to what it is today.
There’s probably history around this issue so it would be useful to hear from developers with more knowledge on it. Thanks.