Gengrid: In reorder & sd->horizontal mode, the condition must be checked for item_loo...
authorChinmaya <chinmaya@chinmaya-VirtualBox.(none)>
Mon, 7 Jul 2014 03:30:21 +0000 (12:30 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Mon, 7 Jul 2014 03:30:21 +0000 (12:30 +0900)
Summary:
The bug was there when reorder mode and sd->horizontal mode is enabled but item_loop_enable
is not set, then also the loop was occuring with right key event.

Test Plan: elementary_test -to "gengrid 2"

Reviewers: raster, seoz, eagleeye, SanghyeonLee

CC: seoz
Differential Revision: https://phab.enlightenment.org/D1121

legacy/elementary/src/bin/test_gengrid.c
legacy/elementary/src/lib/elm_gengrid.c

index 847b66d..ba69f37 100644 (file)
@@ -829,6 +829,12 @@ test_gengrid2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
    evas_object_show(bt);
 
    ck = elm_check_add(win);
+   elm_object_text_set(ck, "Reorder mode enable");
+   evas_object_smart_callback_add(ck, "changed", reorder_mode_cb, grid);
+   elm_box_pack_end(hbx, ck);
+   evas_object_show(ck);
+
+   ck = elm_check_add(win);
    elm_object_text_set(ck, "Horizontal Mode");
    evas_object_smart_callback_add(ck, "changed", _horizontal_grid, grid);
    elm_box_pack_end(hbx, ck);
index b97e6ee..b44f316 100644 (file)
@@ -2428,7 +2428,7 @@ _key_action_move(Evas_Object *obj, const char *params)
                        if (_item_horizontal_loop(obj, ELM_FOCUS_LEFT))
                          return EINA_TRUE;
                     }
-                  else
+                  else if (sd->item_loop_enable)
                     {
                        if (_item_horizontal_loop(obj, ELM_FOCUS_UP))
                          return EINA_TRUE;