elm_genlist: apply the item_select_on_focus_disable feature on key_action_move 00/89900/2
authorSangHyeon Lee <sh10233.lee@samsung.com>
Tue, 27 Sep 2016 10:23:38 +0000 (19:23 +0900)
committerSangHyeon Lee <sh10233.lee@samsung.com>
Thu, 20 Oct 2016 01:44:27 +0000 (10:44 +0900)
This patch is forked by upstream patch
ec8487a8a4021ecccf50def5f4980d28921d1069
written by Minkyu Kang

Change-Id: I0b44f51ea3a5a3ebb816ae160522dabe3dbc141c

src/lib/elm_genlist.c

index 205dbb2ea607f7e60ea39737c30ad0be4afbb933..eb9187ae3c54733cbe332501e4213d5424c3a50b 100644 (file)
@@ -3062,7 +3062,15 @@ _key_action_move(Evas_Object *obj, const char *params)
         it = elm_genlist_first_item_get(obj);
         if (it)
           {
-             elm_genlist_item_selected_set(it, EINA_TRUE);
+             if (_elm_config->item_select_on_focus_disable)
+               {
+                  elm_object_item_focus_set(it, EINA_TRUE);
+                  elm_genlist_item_show(it, ELM_GENLIST_ITEM_SCROLLTO_TOP);
+               }
+             else
+               {
+                  elm_genlist_item_selected_set(it, EINA_TRUE);
+               }
              return EINA_TRUE;
           }
      }
@@ -3071,7 +3079,15 @@ _key_action_move(Evas_Object *obj, const char *params)
         it = elm_genlist_last_item_get(obj);
         if (it)
           {
-             elm_genlist_item_selected_set(it, EINA_TRUE);
+             if (_elm_config->item_select_on_focus_disable)
+               {
+                  elm_object_item_focus_set(it, EINA_TRUE);
+                  elm_genlist_item_show(it, ELM_GENLIST_ITEM_SCROLLTO_BOTTOM);
+               }
+             else
+               {
+                  elm_genlist_item_selected_set(it, EINA_TRUE);
+               }
              return EINA_TRUE;
           }
      }