From 0f81b5854582a0e8f2d83e99dff1c79e21b0370d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 5 Jun 2020 08:44:23 -0400 Subject: [PATCH] columviewlayout: Skip children when we should Every layout manager should call gtk_widget_should_layout on their children before measuring or allocating them. So do it here too. --- gtk/gtkcolumnviewlayout.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gtk/gtkcolumnviewlayout.c b/gtk/gtkcolumnviewlayout.c index 05f218c525..44d99df673 100644 --- a/gtk/gtkcolumnviewlayout.c +++ b/gtk/gtkcolumnviewlayout.c @@ -57,6 +57,9 @@ gtk_column_view_layout_measure_along (GtkColumnViewLayout *self, int child_min_baseline = -1; int child_nat_baseline = -1; + if (!gtk_widget_should_layout (child)) + continue; + gtk_widget_measure (child, orientation, for_size, &child_min, &child_nat, &child_min_baseline, &child_nat_baseline); @@ -117,6 +120,9 @@ gtk_column_view_layout_allocate (GtkLayoutManager *layout_manager, GtkColumnViewColumn *column; int col_x, col_width; + if (!gtk_widget_should_layout (child)) + continue; + if (GTK_IS_COLUMN_VIEW_CELL (child)) { column = gtk_column_view_cell_get_column (GTK_COLUMN_VIEW_CELL (child));