treestore: check the first child when moving after nothing
This commit is contained in:
parent
490e2823ef
commit
07976be6d1
1 changed files with 6 additions and 8 deletions
|
|
@ -2515,15 +2515,13 @@ gtk_tree_store_move (GtkTreeStore *tree_store,
|
|||
}
|
||||
else
|
||||
{
|
||||
/* move after without position is prepending */
|
||||
if (depth)
|
||||
gtk_tree_store_iter_children (GTK_TREE_MODEL (tree_store), &dst_b,
|
||||
&parent_iter);
|
||||
/* move after without position is prepending; the row that
|
||||
* moves is one of the children, so there is a first one */
|
||||
if (gtk_tree_store_iter_children (GTK_TREE_MODEL (tree_store), &dst_b,
|
||||
depth ? &parent_iter : NULL))
|
||||
b = G_NODE (dst_b.user_data);
|
||||
else
|
||||
gtk_tree_store_iter_children (GTK_TREE_MODEL (tree_store), &dst_b,
|
||||
NULL);
|
||||
|
||||
b = G_NODE (dst_b.user_data);
|
||||
b = NULL;
|
||||
}
|
||||
|
||||
/* if a is NULL, b is NULL too -- we are at the end of the list
|
||||
|
|
|
|||
Loading…
Reference in a new issue