[gtk] sortlistmodel: Actually insert unsorted items at the wrong place
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] sortlistmodel: Actually insert unsorted items at the wrong place
- Date: Mon, 17 Sep 2018 01:59:13 +0000 (UTC)
commit b92c328425c74a0152acd9c5f7084d7442e273ea
Author: Benjamin Otte <otte redhat com>
Date: Mon Sep 17 03:50:56 2018 +0200
sortlistmodel: Actually insert unsorted items at the wrong place
We were adding items in reverse order, oops.
gtk/gtksortlistmodel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtksortlistmodel.c b/gtk/gtksortlistmodel.c
index f8561cde8d..f127791ebc 100644
--- a/gtk/gtksortlistmodel.c
+++ b/gtk/gtksortlistmodel.c
@@ -174,7 +174,7 @@ gtk_sort_list_model_add_items (GtkSortListModel *self,
{
gpointer item = g_list_model_get_item (self->model, position + i);
sorted_iter = g_sequence_insert_sorted (self->sorted, item, self->sort_func, self->user_data);
- unsorted_iter = g_sequence_insert_before (unsorted_iter, sorted_iter);
+ g_sequence_insert_before (unsorted_iter, sorted_iter);
if (unmodified_start != NULL || unmodified_end != NULL)
{
pos = g_sequence_iter_get_position (sorted_iter);
@@ -186,7 +186,7 @@ gtk_sort_list_model_add_items (GtkSortListModel *self,
if (unmodified_start)
*unmodified_start = start;
if (unmodified_end)
- *unmodified_end = end;
+ *unmodified_end = end;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]