jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e6a1e456cb3ca7587bd7c1c2dc822af035bf6f42

commit e6a1e456cb3ca7587bd7c1c2dc822af035bf6f42
Author: Jiwon Kim <jwkim0...@gmail.com>
Date:   Thu Mar 2 15:36:00 2017 +0900

    genlist: Remove weird behavior about item_show, bring_in
    
    Summary:
    When if item_show / bring_in is proceeded as 'deferred_show'
    sequence, Scrollto_Type does not be checked perfectly.
    As a result,
    ELM_GENLIST_ITEM_SCROLLTO_NONE and any other integer values
    are worked such as ELM_GENLIST_ITEM_SCROLLTO_BRING_IN.
    
    As doxygen of Elm_Genlist_Item_Scrollto_Type,
    ELM_GENLIST_ITEM_SCROLLTO_NONE and other incorrect number
    should not work.
    
    Fixes T4854
    
    @fix
    
    Reviewers: SanghyeonLee, woohyun, jpeg
    
    Reviewed By: jpeg
    
    Subscribers: id213sin, conr2d, cedric
    
    Maniphest Tasks: T4854
    
    Differential Revision: https://phab.enlightenment.org/D4684
---
 src/lib/elementary/elm_genlist.c       | 11 +++++++++++
 src/lib/elementary/elm_genlist_item.eo |  4 ++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 09a9c7a..7b3e284 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -7094,6 +7094,17 @@ _elm_genlist_item_coordinates_calc(Elm_Gen_Item *it,
 
    Eina_Bool deferred_show = EINA_FALSE;
 
+   switch (type)
+     {
+      case ELM_GENLIST_ITEM_SCROLLTO_IN:
+      case ELM_GENLIST_ITEM_SCROLLTO_TOP:
+      case ELM_GENLIST_ITEM_SCROLLTO_MIDDLE:
+      case ELM_GENLIST_ITEM_SCROLLTO_BOTTOM:
+         break;
+      default: /* Filters unsupported type */
+         return EINA_FALSE;
+     }
+
    //Can't goto the item right now. Reserve it instead.
    if (sd->queue || !(sd->homogeneous && (sd->mode == ELM_LIST_COMPRESS)))
      {
diff --git a/src/lib/elementary/elm_genlist_item.eo 
b/src/lib/elementary/elm_genlist_item.eo
index a0830b8..0ecd147 100644
--- a/src/lib/elementary/elm_genlist_item.eo
+++ b/src/lib/elementary/elm_genlist_item.eo
@@ -29,7 +29,7 @@ enum Elm.Genlist.Item.Scrollto_Type
 {
    [[Defines where to position the item in the genlist.]]
    legacy: elm_genlist_item_scrollto;
-   none = 0,   [[No scrollto.]]
+   none = 0,   [[Nothing will happen, Don't use this value.]]
    in = (1 << 0),   [[To the nearest viewport.]]
    top = (1 << 1),   [[To the top of viewport.]]
    middle = (1 << 2),   [[To the middle of viewport.]]
@@ -50,7 +50,7 @@ class Elm.Genlist.Item(Elm.Widget.Item)
 
                        This returns the item placed before the $item, on
                        the container genlist.
-                       
+
                        If filter is set on genlist, this returns the filtered
                        item placed before $item in the list.
                      ]]

-- 


Reply via email to