forked from enlightenment/efl
elm/list: use while() loop to iterate item list during smart delete
Summary: using EINA_LIST_FREE here double deletes 2 list items on every iteration due to recursive list removals, which prevents some items from being deleted as expected fix T7266 Reviewers: netstar Reviewed By: netstar Subscribers: netstar, cedric, #reviewers, #committers Tags: #efl_widgets Maniphest Tasks: T7266 Differential Revision: https://phab.enlightenment.org/D6829
This commit is contained in:
parent
672cacaaf6
commit
e708c0ae33
|
@ -2431,8 +2431,9 @@ _elm_list_efl_canvas_group_group_del(Eo *obj, Elm_List_Data *sd)
|
||||||
evas_object_event_callback_del
|
evas_object_event_callback_del
|
||||||
(sd->box, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb);
|
(sd->box, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb);
|
||||||
|
|
||||||
EINA_LIST_FREE(sd->items, eo_it)
|
while (sd->items)
|
||||||
efl_del(eo_it);
|
/* will be removed from list in _elm_list_item_elm_widget_item_del_pre */
|
||||||
|
efl_del(eina_list_data_get(sd->items));
|
||||||
|
|
||||||
sd->selected = eina_list_free(sd->selected);
|
sd->selected = eina_list_free(sd->selected);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue