]> Pileus Git - ~andy/gtk/commitdiff
iconview: layout items immediately when setting a GtkTreeModel
authorCosimo Cecchi <cosimoc@gnome.org>
Tue, 1 Nov 2011 00:33:41 +0000 (20:33 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Tue, 1 Nov 2011 15:15:50 +0000 (11:15 -0400)
As the draw handler expects the items to be laid out already, we cannot
queue a layout here to avoid a race condition with the resize that is
queued immediately after, which in turn would lead to a segfault later
in the paint_item() implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=663138

gtk/gtkiconview.c

index 10811d48b8db2e1ca4df21374d3194f19a0dc42a..66072cad822252cdd4a2b933c51eb06f54b39749 100644 (file)
@@ -4934,7 +4934,7 @@ gtk_icon_view_set_model (GtkIconView *icon_view,
 
       gtk_icon_view_build_items (icon_view);
 
-      gtk_icon_view_queue_layout (icon_view);
+      gtk_icon_view_layout (icon_view);
     }
 
   g_object_notify (G_OBJECT (icon_view), "model");