ami pushed a commit to branch elementary-1.15.

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

commit 4da16f3d5ddc941cc5308e16a3d4eb0498add1b2
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 5eca39e..7414ca9 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -3057,10 +3057,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)
@@ -3078,10 +3075,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)
@@ -3138,16 +3132,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)
@@ -3168,7 +3154,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