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 <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9480
This commit is contained in:
Mike Blumenkrantz 2019-08-01 13:31:58 -04:00 committed by Cedric BAIL
parent 085de22d42
commit fe849c9666
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}
}