ami pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=504896e4a674badc82a9512ac90b0b8ce189a4fb

commit 504896e4a674badc82a9512ac90b0b8ce189a4fb
Author: Vaibhav Gupta <g.vaibh...@samsung.com>
Date:   Fri Aug 28 12:04:49 2015 +0530

    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.vaibh...@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
---
 src/lib/elm_gengrid.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index acdd04d..3f392e2 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);

-- 


Reply via email to