ami pushed a commit to branch master.

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

commit a8afaebf3109f1cb8e397e29ce9dbac599f75c4e
Author: Amitesh Singh <amitesh...@samsung.com>
Date:   Wed Aug 26 20:43:39 2015 +0530

    gengrid: no need to loop in case of reorder mode is enabled
    
    There is no need to loop when reorder mode is enabled. This looks
    ugly and nobody wants it. This fault was introduced in 
7aaa5c8d0a4a5714b4f1bf79e
    
    This patch also fixes following crash
       1. elementary_test -to "Gengrid 2".
       2. Enable all the options available.
       3. Do reorder of item via keys.
       4. Observe segv on reordering edge items.
    
    @fix
---
 src/lib/elm_gengrid.c | 24 +++++-------------------
 1 file changed, 5 insertions(+), 19 deletions(-)

diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index a863799..6fc0550 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -3062,10 +3062,7 @@ _key_action_move(Evas_Object *obj, const char *params)
              if (_elm_gengrid_item_edge_check(sd->focused_item, 
ELM_FOCUS_LEFT))
                {
                   if (sd->item_loop_enable)
-                    {
-                       if (_item_horizontal_loop(obj, ELM_FOCUS_RIGHT))
-                         return EINA_TRUE;
-                    }
+                    return EINA_TRUE;
                   return EINA_FALSE;
                }
              if (!sd->horizontal)
@@ -3083,10 +3080,7 @@ _key_action_move(Evas_Object *obj, const char *params)
              if (_elm_gengrid_item_edge_check(sd->focused_item, 
ELM_FOCUS_LEFT))
                {
                   if (sd->item_loop_enable)
-                    {
-                       if (_item_horizontal_loop(obj, ELM_FOCUS_RIGHT))
-                         return EINA_TRUE;
-                    }
+                    return EINA_TRUE;
                   return EINA_FALSE;
                }
              if (!_elm_config->item_select_on_focus_disable)
@@ -3143,16 +3137,8 @@ _key_action_move(Evas_Object *obj, const char *params)
 
              if (_elm_gengrid_item_edge_check(sd->focused_item, 
ELM_FOCUS_RIGHT))
                {
-                  if (sd->item_loop_enable && !sd->horizontal)
-                    {
-                       if (_item_horizontal_loop(obj, ELM_FOCUS_LEFT))
-                         return EINA_TRUE;
-                    }
-                  else if (sd->item_loop_enable)
-                    {
-                       if (_item_horizontal_loop(obj, ELM_FOCUS_UP))
-                         return EINA_TRUE;
-                    }
+                  if (sd->item_loop_enable)
+                    return EINA_TRUE;
                   return EINA_FALSE;
                }
              if (!sd->horizontal)
@@ -3173,7 +3159,7 @@ _key_action_move(Evas_Object *obj, const char *params)
                     {
                        if (_item_horizontal_loop(obj, ELM_FOCUS_UP))
                          return EINA_TRUE;
-                    } 
+                    }
                }
              if (!_elm_config->item_select_on_focus_disable)
                {

-- 


Reply via email to