diff options
author | Benjamin Otte <otte@redhat.com> | 2011-03-29 13:24:34 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-03-29 15:33:27 +0200 |
commit | 9992efdb0e7d0cf52e47817fe049b97967400731 (patch) | |
tree | e2cdddab6587b6e71fc77fbfc714f257a27a05f1 /gtk/gtklabel.c | |
parent | c94dca36cafc1c0538de2517d39b172bcafa9638 (diff) | |
download | gtk+-9992efdb0e7d0cf52e47817fe049b97967400731.tar.gz |
label: Don't create the layout in size_allocate() if not needed
Just update its size if it already exists.
Diffstat (limited to 'gtk/gtklabel.c')
-rw-r--r-- | gtk/gtklabel.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 7431b0f790..ebf443159c 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -3803,13 +3803,8 @@ gtk_label_size_allocate (GtkWidget *widget, GTK_WIDGET_CLASS (gtk_label_parent_class)->size_allocate (widget, allocation); - /* The layout may have been recently cleared in get_size_for_orientation(), - * but the width at that point may not be the same as the allocated width - */ - if (priv->wrap) - gtk_label_clear_layout (label); - - gtk_label_ensure_layout (label); + if (priv->layout) + gtk_label_update_layout_width (label); if (priv->select_info && priv->select_info->window) { |