[gnome-builder] column-layout: ignore invisible children properly



commit 0f4cdce3f4bbd6844ca6d21bca7e349137484ca7
Author: Christian Hergert <chergert redhat com>
Date:   Sat Sep 17 19:04:37 2016 -0700

    column-layout: ignore invisible children properly
    
    We always incremented j even when the child was invisible. We don't
    want to do that or we end up with the wrong result when the first child
    is invisible.

 contrib/egg/egg-column-layout.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/contrib/egg/egg-column-layout.c b/contrib/egg/egg-column-layout.c
index 8e53890..f45842e 100644
--- a/contrib/egg/egg-column-layout.c
+++ b/contrib/egg/egg-column-layout.c
@@ -132,7 +132,7 @@ egg_column_layout_layout (EggColumnLayout *self,
       alloc.width = priv->column_width;
       alloc.height = (height != 0) ? (height - (border_width * 2)) : total_height / n_columns;
 
-      for (; i < priv->children->len; i++, j++)
+      for (; i < priv->children->len; i++)
         {
           EggColumnLayoutChild *child;
           gint child_height;
@@ -187,6 +187,8 @@ egg_column_layout_layout (EggColumnLayout *self,
 
           if (alloc.y > real_tallest_column)
             real_tallest_column = alloc.y;
+
+          j++;
         }
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]