aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUmesh Tanwar <umesh.tanwar@samsung.com>2015-12-07 23:55:33 (GMT)
committerCedric BAIL <cedric@osg.samsung.com>2015-12-08 00:39:40 (GMT)
commit3bed41e7e4a2f12848b24fae18bc50fe486cb2c4 (patch)
tree6aed097cfa1ece3bcb7a2cb76068d4668195e93d
parentpopup: add popup default align config for other profiles. (diff)
downloadelementary-3bed41e7e4a2f12848b24fae18bc50fe486cb2c4.tar.gz
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.tanwar@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 <cedric@osg.samsung.com>
-rw-r--r--src/lib/elm_gengrid.c8
1 files 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