diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-04-25 16:30:12 +0200 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-05-03 13:06:08 +0200 |
commit | c15a7877e9725d104f1d22a9a264048aa044e282 (patch) | |
tree | 04df7ab56dc6fd062d72a917775ae0f47af5c21f /gtk/gtktreemodelsort.c | |
parent | 2b6c6845695dee22035cd8b8b609ad26179c838e (diff) | |
download | gtk+-c15a7877e9725d104f1d22a9a264048aa044e282.tar.gz |
treemodelsort: destroy the root only if we are removing the latest row of the level
GtkIconView doesn't ref the rows of the model so we have to make sure that a
level is actually empty before destroying it.
https://bugzilla.gnome.org/show_bug.cgi?id=698846
Diffstat (limited to 'gtk/gtktreemodelsort.c')
-rw-r--r-- | gtk/gtktreemodelsort.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtktreemodelsort.c b/gtk/gtktreemodelsort.c index b2046c2d8e..a3545e99b9 100644 --- a/gtk/gtktreemodelsort.c +++ b/gtk/gtktreemodelsort.c @@ -1061,7 +1061,7 @@ gtk_tree_model_sort_row_deleted (GtkTreeModel *s_model, gtk_tree_model_sort_free_level (tree_model_sort, elt->children, FALSE); - if (level->ref_count == 0) + if (level->ref_count == 0 && g_sequence_get_length (level->seq) == 1) { gtk_tree_model_sort_increment_stamp (tree_model_sort); gtk_tree_model_row_deleted (GTK_TREE_MODEL (data), path); |