From fe849c96667f1ff48a755e7c1e79a5baa325c580 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 1 Aug 2019 13:31:58 -0400 Subject: [PATCH] efl_ui/flow.box: fix item calc with mixed weights if a box contains an entire row of items with weight(0), and the next row contains items with weights set, the item count must be correctly incremented so that the box uses the right items in its calculations @fix Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D9480 --- src/lib/elementary/efl_ui_box_flow.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_box_flow.c b/src/lib/elementary/efl_ui_box_flow.c index 82917f090d..2ad1fd7cdd 100644 --- a/src/lib/elementary/efl_ui_box_flow.c +++ b/src/lib/elementary/efl_ui_box_flow.c @@ -193,6 +193,7 @@ _efl_ui_box_flow_efl_pack_layout_layout_update(Eo *obj, Efl_Ui_Box_Flow_Data *pd cross_min_sum += row->cross_space; cross_weight_sum += row->cross_weight; + item_last += row->item_count; if (bd->homogeneous) continue; @@ -205,7 +206,6 @@ _efl_ui_box_flow_efl_pack_layout_layout_update(Eo *obj, Efl_Ui_Box_Flow_Data *pd calc_size = box_size; inlist = NULL; - item_last += row->item_count; for (; i < item_last; i++) { double denom; @@ -246,6 +246,7 @@ _efl_ui_box_flow_efl_pack_layout_layout_update(Eo *obj, Efl_Ui_Box_Flow_Data *pd else if (EINA_DBL_EQ(row->weight_sum, 0)) { row->cur_pos += (box_size - row->min_sum) * box_calc[axis].align; + i += row->item_count; } }