seoz pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=eb69708e9131a5b3686309862cd20d9ab45ce339
commit eb69708e9131a5b3686309862cd20d9ab45ce339 Author: Daniel Juyung Seo <[email protected]> Date: Mon Mar 24 00:46:43 2014 +0900 list: Fixed item multi/single selection routine to skip disabled item correctly. @fix --- src/lib/elm_list.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c index 447ce9d..9b7212a 100644 --- a/src/lib/elm_list.c +++ b/src/lib/elm_list.c @@ -95,6 +95,11 @@ _item_multi_select_up(Elm_List_Smart_Data *sd) if (!sd->multi) return EINA_FALSE; prev = elm_list_item_prev(sd->last_selected_item); + while (prev) + { + if (!elm_object_item_disabled_get(prev)) break; + prev = elm_list_item_prev(prev); + } if (!prev) return EINA_TRUE; if (elm_list_item_selected_get(prev)) @@ -118,6 +123,11 @@ _item_multi_select_down(Elm_List_Smart_Data *sd) if (!sd->multi) return EINA_FALSE; next = elm_list_item_next(sd->last_selected_item); + while (next) + { + if (!elm_object_item_disabled_get(next)) break; + next = elm_list_item_next(next); + } if (!next) return EINA_TRUE; if (elm_list_item_selected_get(next)) @@ -149,16 +159,17 @@ _item_single_select_up(Elm_List_Smart_Data *sd) { Elm_Object_Item *prev; - if (!sd->selected) prev = eina_list_data_get(eina_list_last(sd->items)); + if (!sd->selected) + prev = eina_list_data_get(eina_list_last(sd->items)); else + prev = elm_list_item_prev(sd->last_selected_item); + + while (prev) { - prev = elm_list_item_prev(sd->last_selected_item); - while (prev) - { - if (!elm_object_item_disabled_get(prev)) break; - prev = elm_list_item_prev(prev); - } + if (!elm_object_item_disabled_get(prev)) break; + prev = elm_list_item_prev(prev); } + if (!prev) return EINA_FALSE; _all_items_unselect(sd); @@ -173,16 +184,17 @@ _item_single_select_down(Elm_List_Smart_Data *sd) { Elm_Object_Item *next; - if (!sd->selected) next = eina_list_data_get(sd->items); + if (!sd->selected) + next = eina_list_data_get(sd->items); else + next = elm_list_item_next(sd->last_selected_item); + + while (next) { - next = elm_list_item_next(sd->last_selected_item); - while (next) - { - if (!elm_object_item_disabled_get(next)) break; - next = elm_list_item_next(next); - } + if (!elm_object_item_disabled_get(next)) break; + next = elm_list_item_next(next); } + if (!next) return EINA_FALSE; _all_items_unselect(sd); --
