summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2015-08-26 20:43:39 +0530
committerAmitesh Singh <amitesh.sh@samsung.com>2015-08-26 21:04:36 +0530
commita8afaebf3109f1cb8e397e29ce9dbac599f75c4e (patch)
tree67285adf7a29b325c9d59247af0f7c35bd3924c5
parent701865a630509967d38b0fbbfcfb37203e0b83b9 (diff)
downloadelementary-a8afaebf3109f1cb8e397e29ce9dbac599f75c4e.tar.gz
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
-rw-r--r--src/lib/elm_gengrid.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index a8637994a..6fc0550cc 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)
{