diff options
author | Vaibhav Gupta <g.vaibhav1@samsung.com> | 2015-08-28 12:04:49 +0530 |
---|---|---|
committer | Amitesh Singh <amitesh.sh@samsung.com> | 2015-08-28 12:04:49 +0530 |
commit | 504896e4a674badc82a9512ac90b0b8ce189a4fb (patch) | |
tree | 299a098f32bcccf51cce9d536a0ea41f122dab76 | |
parent | 88d7577a1ba72142d0691312d47905d6d50663f9 (diff) | |
download | elementary-504896e4a674badc82a9512ac90b0b8ce189a4fb.tar.gz |
Gengrid: Fix wrong focus movement in _item_single_select_down
Summary:
The focus movement is wrong when down key press
is done of first item of last row, intsead of
taking the focus out, it moves the focus to next
item (right).
@fix
Signed-off-by: Vaibhav Gupta <g.vaibhav1@samsung.com>
Test Plan:
1. Launch elementary_test -> Gengrid 2 sample
2. Add a few items such that there are 2 items in last row
3. Do a down key press on 1st item of last row
4. Observe focus movement
Reviewers: raster, Hermet, SanghyeonLee, singh.amitesh
Subscribers: sachin.dev
Differential Revision: https://phab.enlightenment.org/D3001
-rw-r--r-- | src/lib/elm_gengrid.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index acdd04d71..3f392e2f8 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -2334,7 +2334,9 @@ _item_single_select_down(Elm_Gengrid_Data *sd) if (!eo_next) { idx = elm_gengrid_item_index_get(eo_orig); - if ((idx == sd->item_count) || ((sd->item_count) % (sd->nmax) == 0)) + if (idx > sd->item_count - + ((sd->item_count % sd->nmax) == 0 ? + sd->nmax : (sd->item_count % sd->nmax))) return EINA_FALSE; else eo_next = elm_gengrid_last_item_get(sd->obj); |