gengrid: fix wrong condition on next item search 19/200619/2
authorSangHyeon Jade Lee <sh10233.lee@samsung.com>
Wed, 27 Feb 2019 09:56:25 +0000 (18:56 +0900)
committerSangHyeon Jade Lee <sh10233.lee@samsung.com>
Wed, 27 Feb 2019 09:58:42 +0000 (18:58 +0900)
Change-Id: I81b157092eb028d5bb27a4c01f34d20db3c31dcf
Signed-off-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
src/lib/elementary/elm_gengrid.c

index 2f2e1b0..280a978 100644 (file)
@@ -2920,8 +2920,9 @@ _item_focus_left(Elm_Gengrid_Data *sd)
    if (!sd->focused_item)
      {
         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
@@ -2954,8 +2955,9 @@ _item_focus_right(Elm_Gengrid_Data *sd)
    if (!sd->focused_item)
      {
         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
@@ -3155,8 +3157,9 @@ _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
@@ -3189,8 +3192,9 @@ _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
@@ -3914,8 +3918,9 @@ _pick_item(Elm_Gengrid_Data *sd, Elm_Focus_Direction dir)
    else
      next = ELM_GEN_ITEM_FROM_INLIST(sd->items->last);
 
-   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))))
      {
        if (dir == ELM_FOCUS_RIGHT || dir == ELM_FOCUS_DOWN)
          next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next);