mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 17:33:24 +00:00
Fix divelist sorting
That was stupid. The divelist column generation cleanup (commit
d3feb78df5
: "Make helper function for creating TreeView columns in the
dive list") had a but too much copy-paste going on, and didn't always
have the right column indexes.. t still *looked* right, but sorting
didn't work at all.
Reported-by: Chris Lewis <chrislewis915@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
0bf2cfa66d
commit
f627dde023
1 changed files with 2 additions and 2 deletions
|
@ -428,7 +428,7 @@ static GtkTreeViewColumn *divelist_column(struct DiveList *dl, int index, const
|
|||
col = gtk_tree_view_column_new();
|
||||
|
||||
gtk_tree_view_column_set_title(col, title);
|
||||
gtk_tree_view_column_set_sort_column_id(col, DIVE_DATE);
|
||||
gtk_tree_view_column_set_sort_column_id(col, index);
|
||||
gtk_tree_view_column_set_resizable(col, TRUE);
|
||||
gtk_tree_view_column_pack_start(col, renderer, TRUE);
|
||||
if (data_func)
|
||||
|
@ -476,7 +476,7 @@ GtkWidget *dive_list_create(void)
|
|||
dive_list.temperature = divelist_column(&dive_list, DIVE_TEMPERATURE, "degF", temperature_data_func, 1, 0);
|
||||
dive_list.cylinder = divelist_column(&dive_list, DIVE_CYLINDER, "Cyl", NULL, 0, 0);
|
||||
dive_list.nitrox = divelist_column(&dive_list, DIVE_NITROX, "O2%", nitrox_data_func, 1, 0);
|
||||
dive_list.sac = divelist_column(&dive_list, DIVE_NITROX, "SAC", sac_data_func, 1, 0);
|
||||
dive_list.sac = divelist_column(&dive_list, DIVE_SAC, "SAC", sac_data_func, 1, 0);
|
||||
|
||||
fill_dive_list();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue