From bbd9c5983211244ec5bc8fb0ecc0e67d9f8345a6 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 29 Jul 2015 22:25:52 +0200 Subject: [PATCH] combobox: Handle NULLing the cellview on remove simpler --- gtk/gtkcombobox.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 3c79f912e7..0f77a2dd41 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -1556,18 +1556,12 @@ gtk_combo_box_add (GtkContainer *container, gtk_widget_unparent (priv->cell_view); _gtk_bin_set_child (GTK_BIN (container), NULL); gtk_widget_queue_resize (GTK_WIDGET (container)); + priv->cell_view = NULL; } gtk_widget_set_parent (widget, GTK_WIDGET (container)); _gtk_bin_set_child (GTK_BIN (container), widget); - if (priv->cell_view && - widget != priv->cell_view) - { - /* since the cell_view was unparented, it's gone now */ - priv->cell_view = NULL; - } - if (priv->has_entry) { /* this flag is a hack to tell the entry to fill its allocation.