gtkbox: remove unnecessary queue_compute_expand()
The expand child property does not have any effect on the expand state of the GtkBox, so queuing a compute_expand when changing it is not needed. https://bugzilla.gnome.org/show_bug.cgi?id=769162
This commit is contained in:
committed by
Matthias Clasen
parent
a72f1c76c8
commit
4556d0f0fe
12
gtk/gtkbox.c
12
gtk/gtkbox.c
@ -2540,17 +2540,11 @@ gtk_box_set_child_packing (GtkBox *box,
|
|||||||
gtk_widget_freeze_child_notify (child);
|
gtk_widget_freeze_child_notify (child);
|
||||||
if (list)
|
if (list)
|
||||||
{
|
{
|
||||||
gboolean expanded;
|
expand = expand != FALSE;
|
||||||
|
|
||||||
expanded = expand != FALSE;
|
if (child_info->expand != expand)
|
||||||
|
|
||||||
/* avoid setting expand if unchanged, since queue_compute_expand
|
|
||||||
* can be expensive-ish
|
|
||||||
*/
|
|
||||||
if (child_info->expand != expanded)
|
|
||||||
{
|
{
|
||||||
child_info->expand = expand != FALSE;
|
child_info->expand = expand;
|
||||||
gtk_widget_queue_compute_expand (GTK_WIDGET (box));
|
|
||||||
gtk_container_child_notify_by_pspec (GTK_CONTAINER (box), child, child_props[CHILD_PROP_EXPAND]);
|
gtk_container_child_notify_by_pspec (GTK_CONTAINER (box), child, child_props[CHILD_PROP_EXPAND]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user