Commit eaddf70a authored by Rui Matos's avatar Rui Matos Committed by Kristian Rietveld

GtkTreeModelFilter: Fix _iter_previous() when iter points at 2nd node

GSequence iterators point at the position between two elements so an
iterator pointing at the N tree model node is actually between the N-1
and N sequence elements. This means that asking for the previous
sequence iterator first and then checking if it is the begin iterator
would yeld true for an iterator pointing at the 2nd tree model node
and make us return FALSE mistakenly.

https://bugzilla.gnome.org/show_bug.cgi?id=679910
parent 96c19108
......@@ -3227,12 +3227,12 @@ gtk_tree_model_filter_iter_previous (GtkTreeModel *model,
elt = iter->user_data2;
siter = g_sequence_iter_prev (elt->visible_siter);
if (g_sequence_iter_is_begin (siter))
if (g_sequence_iter_is_begin (elt->visible_siter))
{
iter->stamp = 0;
return FALSE;
}
siter = g_sequence_iter_prev (elt->visible_siter);
iter->user_data2 = GET_ELT (siter);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment