From d8c7c7ec15ed0c2f856488cc9f5e789d98839569 Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Fri, 19 Oct 2012 07:46:33 +0000 Subject: [PATCH] elementary/transit - fix elm_transit image animation that last few frame are skipped SVN revision: 78233 --- legacy/elementary/ChangeLog | 5 ++++- legacy/elementary/NEWS | 1 + legacy/elementary/src/lib/elm_transit.c | 17 +++++++++-------- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/legacy/elementary/ChangeLog b/legacy/elementary/ChangeLog index da2f9115b4..1ba03b4967 100644 --- a/legacy/elementary/ChangeLog +++ b/legacy/elementary/ChangeLog @@ -631,5 +631,8 @@ it can be scroll. And the end of the item is fitted on the end of the viewport. 2012-10-19 Tae-Hwan Kim (Bluezery) - * Fixed wrong_calc_job parameter. + +2012-10-19 ChunEon Park (Hermet) + + * Fix elm_transit image animation which last few frames are skipped. diff --git a/legacy/elementary/NEWS b/legacy/elementary/NEWS index 786b3195a7..de605c7f53 100644 --- a/legacy/elementary/NEWS +++ b/legacy/elementary/NEWS @@ -45,6 +45,7 @@ Fixes: * Fix genlist reorder mode item not being resized on genlist resize. * Fix on_focus_region() issue. * Fixed gengrid wrong_calc_job parameter. + * Fix elm_transit image animation that last few frames are skipped. Removals: diff --git a/legacy/elementary/src/lib/elm_transit.c b/legacy/elementary/src/lib/elm_transit.c index fa201da123..f083033947 100644 --- a/legacy/elementary/src/lib/elm_transit.c +++ b/legacy/elementary/src/lib/elm_transit.c @@ -2313,15 +2313,16 @@ _transit_effect_image_animation_op(Elm_Transit_Effect *effect, Elm_Transit *tran type = eina_stringshare_add("elm_icon"); len = eina_list_count(image_animation->images); - - if (!len) count = floor(progress * len); - else count = floor(progress * (len - 1)); - - EINA_LIST_FOREACH(transit->objs, elist, obj) + if (len) { - if (elm_widget_type_check(obj, type, __func__)) - elm_image_file_set(obj, - eina_list_nth(image_animation->images, count), NULL); + count = floor(progress * len); + EINA_LIST_FOREACH(transit->objs, elist, obj) + { + if (elm_widget_type_check(obj, type, __func__)) + elm_image_file_set(obj, + eina_list_nth(image_animation->images, count), + NULL); + } } eina_stringshare_del(type);