forked from enlightenment/efl
genlist: scroll to item when calc is done
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>
This commit is contained in:
parent
7908431178
commit
834dd49944
|
@ -581,6 +581,8 @@ _item_scroll(Elm_Genlist_Data *sd)
|
||||||
dw = it->item->block->w;
|
dw = it->item->block->w;
|
||||||
dh = oh;
|
dh = oh;
|
||||||
|
|
||||||
|
if (dw < 1) return;
|
||||||
|
|
||||||
switch (sd->scroll_to_type)
|
switch (sd->scroll_to_type)
|
||||||
{
|
{
|
||||||
case ELM_GENLIST_ITEM_SCROLLTO_TOP:
|
case ELM_GENLIST_ITEM_SCROLLTO_TOP:
|
||||||
|
@ -6947,6 +6949,19 @@ _elm_genlist_item_coordinates_calc(Elm_Gen_Item *it,
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (it->item->block->w < 1)
|
||||||
|
{
|
||||||
|
sd->check_scroll = EINA_TRUE;
|
||||||
|
sd->show_item = it;
|
||||||
|
sd->bring_in = bring_in;
|
||||||
|
sd->scroll_to_type = type;
|
||||||
|
it->item->show_me = EINA_TRUE;
|
||||||
|
|
||||||
|
ecore_job_del(sd->calc_job);
|
||||||
|
sd->calc_job = ecore_job_add(_calc_job, sd->obj);
|
||||||
|
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
if (sd->show_item)
|
if (sd->show_item)
|
||||||
{
|
{
|
||||||
sd->show_item->item->show_me = EINA_FALSE;
|
sd->show_item->item->show_me = EINA_FALSE;
|
||||||
|
|
Loading…
Reference in New Issue