From c588d8f85894b4131096ec0ad69971d013bbaa1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 10 Apr 2020 16:04:20 +0200 Subject: [PATCH] label: Clear select info before creating a new one E.g. set_markup_internal will create a new select_info, but then we were destroying it again, just to recreate it later. --- gtk/gtklabel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index fc2e663a9f..6331b3fa4d 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -1856,6 +1856,8 @@ gtk_label_recalculate (GtkLabel *label) guint keyval = priv->mnemonic_keyval; gtk_label_clear_links (label); + gtk_label_clear_layout (label); + gtk_label_clear_select_info (label); if (priv->use_markup) gtk_label_set_markup_internal (label, priv->label, priv->use_underline); @@ -1878,8 +1880,6 @@ gtk_label_recalculate (GtkLabel *label) g_object_notify_by_pspec (G_OBJECT (label), label_props[PROP_MNEMONIC_KEYVAL]); } - gtk_label_clear_layout (label); - gtk_label_clear_select_info (label); gtk_widget_queue_resize (GTK_WIDGET (label)); }