fix: column flow layout wrongly calculated height of second and subsequent columns...
authorAndrea Weikert <elubie@gmx.net>
Wed, 1 Aug 2012 17:52:14 +0000 (17:52 +0000)
committerAndrea Weikert <elubie@gmx.net>
Wed, 1 Aug 2012 17:52:14 +0000 (17:52 +0000)
* discovered while playing with the column flow layout in asset branch.

source/blender/editors/interface/interface_layout.c

index 3270015271a48b0356ed8c2183d36304ff218b5e..10fde402acc5c7ce8e3253960ce174143ef7436e 100644 (file)
@@ -1960,6 +1960,7 @@ static void ui_litem_estimate_column_flow(uiLayout *litem)
                        x += maxw + litem->space;
                        maxw = 0;
                        y = 0;
+                       emy = 0; /* need to reset height again for next column */
                        col++;
                }
        }
@@ -2010,6 +2011,7 @@ static void ui_litem_layout_column_flow(uiLayout *litem)
                if (col < flow->totcol - 1 && emy <= -emh) {
                        x += itemw + style->columnspace;
                        y = litem->y;
+                       emy = 0; /* need to reset height again for next column */
                        col++;
                }
        }