Gengrid: Set focus after item looping
authorYeshwanth Reddivari <r.yeshwanth@samsung.com>
Fri, 14 Aug 2015 05:50:30 +0000 (11:20 +0530)
committerAmitesh Singh <amitesh.sh@samsung.com>
Fri, 14 Aug 2015 05:50:30 +0000 (11:20 +0530)
Summary:
After item looping, Gengrid item was getting selected.
So, checked for item_select_on_focus_disable flag and
accordingly set focus state or selected state of Gengrid item.

@fix

Signed-off-by: Yeshwanth Reddivari <r.yeshwanth@samsung.com>
Reviewers: raster, Hermet, singh.amitesh, SanghyeonLee

Subscribers: sachin.dev

Differential Revision: https://phab.enlightenment.org/D2937

legacy/elementary/src/lib/elm_gengrid.c

index 65783c6..f31ece6 100644 (file)
@@ -3011,7 +3011,10 @@ _item_horizontal_loop(Evas_Object *obj, Elm_Focus_Direction dir)
      }
    else
      {
-        elm_gengrid_item_selected_set(eo_item, EINA_TRUE);
+        if (_elm_config->item_select_on_focus_disable)
+          elm_object_item_focus_set(eo_item, EINA_TRUE);
+        else
+          elm_gengrid_item_selected_set(eo_item, EINA_TRUE);
         return EINA_TRUE;
      }
    return EINA_FALSE;