From: zmike Date: Sun, 10 Aug 2014 18:28:16 +0000 (-0400) Subject: gengrid once again selects items using keyboard when no item was previously selected X-Git-Tag: v1.11.0-beta2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9b51245e87a2da6a00fd96fff358439d0b72532;p=platform%2Fupstream%2Felementary.git gengrid once again selects items using keyboard when no item was previously selected this was yet another thing broken by the mostly-unreviewed and untested widget item focus feature. it's still not completely fixed, since the reorder modes are broken, but at least it works for the general case again @fix --- diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index 3909123..efdb5d3 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -2587,8 +2587,8 @@ _key_action_move(Evas_Object *obj, const char *params) } else { - if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_LEFT) || - !elm_gengrid_item_prev_get(sd->focused_item)) + if (sd->focused_item && (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_LEFT) || + !elm_gengrid_item_prev_get(sd->focused_item))) { if (sd->item_loop_enable) { @@ -2654,7 +2654,7 @@ _key_action_move(Evas_Object *obj, const char *params) } if (sd->horizontal) { - if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_RIGHT)) + if (sd->focused_item && _elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_RIGHT)) { if (sd->item_loop_enable) { @@ -2672,8 +2672,8 @@ _key_action_move(Evas_Object *obj, const char *params) } else { - if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_RIGHT) || - !elm_gengrid_item_next_get(sd->focused_item)) + if (sd->focused_item && (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_RIGHT) || + !elm_gengrid_item_next_get(sd->focused_item))) { if (sd->item_loop_enable) { @@ -2727,7 +2727,7 @@ _key_action_move(Evas_Object *obj, const char *params) } if (sd->horizontal) { - if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_UP)) + if (sd->focused_item && _elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_UP)) return EINA_FALSE; if (!_elm_config->item_select_on_focus_disable) { @@ -2784,7 +2784,7 @@ _key_action_move(Evas_Object *obj, const char *params) } if (sd->horizontal) { - if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_DOWN)) + if (sd->focused_item && _elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_DOWN)) return EINA_FALSE; if (!_elm_config->item_select_on_focus_disable) {