fix bug when sorting

This commit is contained in:
Chris Cromer 2019-07-20 17:46:41 -04:00
parent a46b95437f
commit 8dc3bb9915
Signed by: cromer
GPG Key ID: 39CC813FF3C8708A
1 changed files with 6 additions and 6 deletions

View File

@ -212,10 +212,10 @@ namespace Colegio {
asociado_list.sort_with_data ((a, b) => {
if (curso.sort_order == Gtk.SortType.ASCENDING) {
return strcmp (a.curso.nombre, b.curso.nombre);
return strcmp (a.curso.id_curso, b.curso.id_curso);
}
else {
return strcmp (b.curso.nombre, a.curso.nombre);
return strcmp (b.curso.id_curso, a.curso.id_curso);
}
});
}
@ -225,7 +225,7 @@ namespace Colegio {
Gtk.TreeIter iter;
list_store.append (out iter);
list_store.set (iter,
Column.CURSO, entry.curso.nombre,
Column.CURSO, entry.curso.id_curso,
Column.ASIGNATURA, entry.asignatura.nombre,
Column.ASOCIADO, entry);
});