summaryrefslogtreecommitdiff
path: root/gtk/gtktreeview.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2020-10-20 01:50:12 +0200
committerBenjamin Otte <otte@redhat.com>2020-10-20 04:50:12 +0200
commitd9b216e62940aa9b159611a88ed9af57a050e51d (patch)
tree35400e5984403eb93cb3afa9800280ec0a4f95cb /gtk/gtktreeview.c
parent83d8ae2f3091ca591a9dbf336c33d7dc29b2ca19 (diff)
downloadgtk+-d9b216e62940aa9b159611a88ed9af57a050e51d.tar.gz
widget: Always update the CSS node
Anybody who keeps their own CSS nodes around or wants to order CSS nodes different from widgets will from now on have to do it manually all the time. This is outdated behavior, nobody should be doing either of those two things. Also, the correct case is much more common, and not doing it automatically was causing bugs. Fixes #3280
Diffstat (limited to 'gtk/gtktreeview.c')
-rw-r--r--gtk/gtktreeview.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 315360c683..4c76f0405d 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -10790,10 +10790,12 @@ gtk_tree_view_insert_column (GtkTreeView *tree_view,
column, position);
priv->n_columns++;
- gtk_tree_view_update_button_position (tree_view, column);
-
_gtk_tree_view_column_set_tree_view (column, tree_view);
+ /* XXX: We need to reparent the node into the header, somebody make that a real widget */
+ gtk_css_node_set_parent (gtk_widget_get_css_node (gtk_tree_view_column_get_button (column)), NULL);
+ gtk_tree_view_update_button_position (tree_view, column);
+
if (gtk_widget_get_realized (GTK_WIDGET (tree_view)))
{
GList *list;