cedric pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=3bed41e7e4a2f12848b24fae18bc50fe486cb2c4

commit 3bed41e7e4a2f12848b24fae18bc50fe486cb2c4
Author: Umesh Tanwar <umesh.tan...@samsung.com>
Date:   Mon Dec 7 15:55:33 2015 -0800

    gengrid: fix Logic in _item_single_select_left and 
_item_single_select_right.
    
    Summary:
    In _item_single_select_left/right functions if logic is corrected from && 
to ||.
    The previous thing is like: if "there is a generation mismatch" and "item is
    disable" then only get the next gengrid item. This seems logically 
incorrect.
    
    The suggested logic is if "there is generation mismatch" OR "item disabled" 
then
    go for the new item. Whether we get a generation mismatch or item disable, 
we
    should look for next item. So there should be || logic instead of && logic.
    
    @fix
    
    Signed-off-by: Umesh Tanwar <umesh.tan...@samsung.com>
    
    Reviewers: Hermet, raster, singh.amitesh, SanghyeonLee, cedric
    
    Subscribers: cedric, sachin.dev
    
    Differential Revision: https://phab.enlightenment.org/D3354
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/elm_gengrid.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index 3c6018e..093f5e4 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -2366,8 +2366,8 @@ _item_single_select_left(Elm_Gengrid_Data *sd)
    if (!sd->selected)
      {
         prev = ELM_GEN_ITEM_FROM_INLIST(sd->items->last);
-        while ((prev) && (prev->generation < sd->generation)
-               && elm_object_item_disabled_get(EO_OBJ(prev)))
+        while (((prev) && (prev->generation < sd->generation))
+               || elm_object_item_disabled_get(EO_OBJ(prev)))
           prev = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev);
      }
    else
@@ -2400,8 +2400,8 @@ _item_single_select_right(Elm_Gengrid_Data *sd)
    if (!sd->selected)
      {
         next = ELM_GEN_ITEM_FROM_INLIST(sd->items);
-        while ((next) && (next->generation < sd->generation)
-               && elm_object_item_disabled_get(EO_OBJ(next)))
+        while (((next) && (next->generation < sd->generation))
+               || elm_object_item_disabled_get(EO_OBJ(next)))
           next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next);
      }
    else

-- 


Reply via email to