genlist: scroll to item when calc is done 15/117215/4
authorJee-Yong Um <jc9.um@samsung.com>
Thu, 23 Jun 2016 17:09:13 +0000 (10:09 -0700)
committerSangHyeon Lee <sh10233.lee@samsung.com>
Wed, 5 Apr 2017 04:38:44 +0000 (13:38 +0900)
Summary:
If elm_genlist_item_bring_in() is called immediately after appending
item, genlist will not scroll to the last one but stop in the middle.
This patch blocks genlist from scrolling to not calculated item.

Test Plan:
1. Download F31560 and uncompress the file
2. make
3. ./test

Reviewers: SanghyeonLee

Subscribers: cedric, DaveMDS, jpeg

Differential Revision: https://phab.enlightenment.org/D4023

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Change-Id: I972e7f7b91ee885bf87c0338083a0449fa8510df

src/lib/elm_genlist.c

index 3ce10af..06dd8d8 100644 (file)
@@ -7093,11 +7093,12 @@ _elm_genlist_item_coordinates_calc(Elm_Gen_Item *it,
    ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
 
    // TIZEN ONLY(20160630): Support homogeneous mode in item class.
-   if ((sd->queue) ||
+   if ((sd->queue) || (it->item->block->w < 1) ||
        (!((sd->homogeneous || it->itc->homogeneous) &&
           (sd->mode == ELM_LIST_COMPRESS))))
      {
-        if ((it->item->queued) || (!it->item->mincalcd) || (sd->queue))
+        if ((it->item->queued) || (!it->item->mincalcd) ||
+            (sd->queue) || (it->item->block->w < 1))
           {
              sd->check_scroll = EINA_TRUE;
              sd->show_item = it;